:root {
  --ink: #142330;
  --ink-2: #344957;
  --muted: #74838e;
  --line: #e4eaed;
  --line-strong: #d5dee3;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --navy: #102b3b;
  --navy-2: #183c4d;
  --teal: #148370;
  --teal-dark: #0c6d5e;
  --teal-soft: #e3f3ef;
  --orange: #ef9b3d;
  --orange-soft: #fff1df;
  --red: #d95c59;
  --red-soft: #fbe9e8;
  --blue: #447fbc;
  --blue-soft: #e9f1fa;
  --violet: #766aa8;
  --violet-soft: #efedf8;
  --green: #2c936d;
  --green-soft: #e5f5ed;
  --shadow: 0 10px 28px rgba(20, 35, 48, .07);
  --shadow-strong: 0 24px 70px rgba(12, 32, 43, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 240px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

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

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

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

.text-teal {
  color: var(--teal);
}

.eyebrow {
  display: inline-block;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.eyebrow.light {
  color: #79d7c7;
}

.login-view {
  display: grid;
  grid-template-columns: minmax(430px, 1.1fr) minmax(440px, .9fr);
  min-height: 100vh;
  background: #f7faf9;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 46px 7vw 54px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 22%, rgba(63, 176, 158, .28), transparent 28%),
    radial-gradient(circle at 18% 85%, rgba(239, 155, 61, .14), transparent 24%),
    linear-gradient(145deg, #0e2838 0%, #123447 58%, #0c5960 100%);
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.brand-wordmark {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px 4px 10px 4px;
  color: #0f3040;
  background: #88dfcf;
  font-family: Georgia, serif;
  font-size: 21px;
  font-style: italic;
  font-weight: 700;
}

.login-brand-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
  margin: auto 0;
  padding: 80px 0;
}

.login-brand-copy h1 {
  margin: 18px 0 22px;
  font-size: clamp(42px, 4.8vw, 70px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.055em;
}

.login-brand-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(235, 248, 246, .72);
  font-size: 15px;
  line-height: 1.9;
}

.login-proof {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 44px;
}

.login-proof div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-proof strong {
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}

.login-proof span {
  color: rgba(235, 248, 246, .58);
  font-size: 11px;
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(120, 219, 200, .13);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: 20%;
  right: -110px;
  width: 480px;
  height: 480px;
}

.orbit-two {
  top: 30%;
  right: 8px;
  width: 330px;
  height: 330px;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  padding: 50px;
  place-items: center;
}

.login-form-wrap {
  width: min(390px, 100%);
}

.login-form-wrap h2 {
  margin: 10px 0 8px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.login-form-wrap > p {
  margin: 0 0 34px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field > span,
.field-label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.field > span em {
  margin-left: 3px;
  color: var(--red);
  font-style: normal;
}

.field input,
.field select,
.field textarea,
.control,
.filter-input {
  width: 100%;
  min-height: 41px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.control:focus,
.filter-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 131, 112, .1);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a9b3ba;
}

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

.field-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 62px;
}

.icon-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 6px;
  color: var(--teal);
  font-size: 11px;
  transform: translateY(-50%);
}

.form-error {
  margin: -4px 0 14px;
  padding: 9px 11px;
  border-radius: 7px;
  color: #a93432;
  background: var(--red-soft);
  font-size: 12px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 5px 13px rgba(20, 131, 112, .2);
}

.button.primary:hover {
  background: var(--teal-dark);
}

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

.button.secondary:hover {
  border-color: #b8c6cc;
  background: #fbfcfc;
}

.button.soft {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

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

.button.ghost {
  color: var(--muted);
  background: transparent;
}

.button.block {
  width: 100%;
}

.button.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.login-submit {
  min-height: 46px;
  margin-top: 4px;
  font-size: 13px;
}

.login-submit span {
  margin-left: auto;
  font-size: 18px;
}

.demo-accounts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.demo-accounts > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.demo-accounts button {
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.login-note {
  margin: 25px 0 0 !important;
  color: #98a4ab;
  font-size: 10px;
}

.app-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow: hidden;
  color: #d8e5e8;
  background: var(--navy);
  transition: width .22s ease, transform .22s ease;
}

.sidebar-head {
  display: flex;
  height: 76px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand-wordmark.compact {
  gap: 10px;
  color: #fff;
  font-size: 16px;
}

.brand-wordmark.compact .brand-mark {
  width: 31px;
  height: 31px;
  font-size: 19px;
}

.sidebar-toggle {
  display: flex;
  width: 28px;
  height: 28px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 12px;
  height: 1px;
  background: #93aab3;
}

.sidebar-toggle span:last-child {
  width: 8px;
  margin-left: -4px;
}

.main-nav {
  flex: 1 1 auto;
  padding: 23px 12px;
  overflow-y: auto;
}

.nav-section {
  margin: 19px 11px 8px;
  color: #6e8994;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  white-space: nowrap;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  height: 43px;
  align-items: center;
  gap: 12px;
  margin-bottom: 3px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #93aab3;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .15s, background .15s;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}

.nav-item.active {
  color: #fff;
  background: rgba(62, 165, 146, .18);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #65cdb9;
}

.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
}

.nav-badge {
  min-width: 19px;
  padding: 2px 6px;
  border-radius: 20px;
  color: #ffe3c0;
  background: rgba(239, 155, 61, .18);
  font-size: 9px;
  text-align: center;
}

.sidebar-insight {
  margin: 8px 16px 14px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  white-space: nowrap;
}

.sidebar-insight .insight-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #66d0bb;
  box-shadow: 0 0 0 4px rgba(102, 208, 187, .1);
}

.sidebar-insight strong {
  color: #d8e8e8;
  font-size: 10px;
}

.mini-progress {
  height: 4px;
  margin: 12px 0 7px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65cdb9, #efb15f);
  transition: width .4s;
}

.sidebar-insight p {
  margin: 0;
  color: #78939d;
  font-size: 9px;
}

.sidebar-user {
  display: flex;
  height: 73px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.user-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #237d75, #e19b4f);
  font-size: 12px;
  font-weight: 800;
}

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

.sidebar-user-info strong {
  display: block;
  overflow: hidden;
  color: #e9f1f2;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info span {
  display: block;
  margin-top: 2px;
  color: #718e99;
  font-size: 9px;
}

.logout-button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #78939d;
  background: transparent;
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  transition: margin-left .22s ease;
}

.topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.breadcrumb {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search {
  display: flex;
  width: 285px;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9f8;
}

.search-icon {
  color: #88969d;
  font-size: 19px;
  line-height: 1;
  transform: rotate(-20deg);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.global-search kbd {
  padding: 2px 5px;
  border: 1px solid #dce3e5;
  border-radius: 4px;
  color: #96a2a8;
  background: #fff;
  font-family: inherit;
  font-size: 8px;
}

.top-icon {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-2);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.top-icon i {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.ai-top-button {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #138472, #205969);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}

.ai-top-button:hover {
  box-shadow: 0 4px 13px rgba(20, 131, 112, .24);
}

.today-chip {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  background: #f4f7f6;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #5d747c;
  background: #f3f6f5;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8da0a5;
}

.sync-status.online {
  color: #16715f;
  background: #e9f6f2;
}

.sync-status.online i {
  background: #2ca47f;
  box-shadow: 0 0 0 3px rgba(44, 164, 127, .12);
}

.sync-status.pending {
  color: #a96c1c;
  background: #fff5e7;
}

.sync-status.pending i,
.sync-status.offline i {
  background: #dc8730;
}

.sync-status.offline {
  color: #a14d4b;
  background: #fbecEB;
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 19px;
}

.page-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 25px 28px 44px;
}

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

.page-heading h1 {
  margin: 0 0 5px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 3px 14px rgba(21, 40, 50, .035);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px 10px;
}

.card-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.card-body {
  padding: 12px 19px 19px;
}

.card-link {
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

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

.metric-card {
  position: relative;
  min-height: 119px;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 14px rgba(21, 40, 50, .03);
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -35px;
  right: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--metric-glow, rgba(20, 131, 112, .05));
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-top span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.metric-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--metric-color, var(--teal));
  background: var(--metric-bg, var(--teal-soft));
}

.metric-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin: 6px 0 4px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.045em;
}

.metric-value small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.metric-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9aa5aa;
  font-size: 9px;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 700;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr);
  gap: 16px;
  margin-bottom: 16px;
}

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

.chart-box {
  position: relative;
  min-height: 245px;
}

.line-chart {
  display: block;
  width: 100%;
  height: 225px;
  overflow: visible;
}

.line-chart text {
  fill: #98a5ab;
  font-family: var(--font);
  font-size: 9px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 4px 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: var(--teal);
}

.donut-layout {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 42px);
}

.donut {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 25%, #e7edeb 0);
}

.donut::after {
  content: "";
  position: absolute;
  width: 99px;
  height: 99px;
  border-radius: 50%;
  background: #fff;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.donut-center span {
  color: var(--muted);
  font-size: 9px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend-item {
  display: grid;
  grid-template-columns: 8px minmax(65px, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 135px;
  font-size: 10px;
}

.donut-legend-item i {
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: var(--dot);
}

.donut-legend-item span {
  color: var(--ink-2);
}

.donut-legend-item strong {
  font-size: 10px;
}

.bar-chart {
  display: flex;
  min-height: 220px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  padding: 20px 4px 0;
}

.bar-column {
  display: flex;
  min-width: 28px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 190px;
}

.bar-value {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
}

.bar-track {
  display: flex;
  width: min(34px, 70%);
  height: 145px;
  align-items: flex-end;
  border-radius: 7px 7px 3px 3px;
  background: #f1f5f3;
}

.bar-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #35a18c, #137c6b);
}

.bar-column:nth-child(3n) .bar-fill {
  background: linear-gradient(180deg, #f0ad55, #dd8930);
}

.bar-label {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0 5px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.funnel-label {
  color: var(--ink-2);
  font-size: 10px;
}

.funnel-track {
  height: 20px;
  overflow: hidden;
  border-radius: 5px;
  background: #f0f4f3;
}

.funnel-fill {
  display: flex;
  height: 100%;
  align-items: center;
  min-width: 4px;
  padding-left: 8px;
  border-radius: inherit;
  color: rgba(255, 255, 255, .82);
  background: var(--funnel-color, var(--teal));
  font-size: 8px;
}

.funnel-row strong {
  color: var(--ink-2);
  font-size: 10px;
  text-align: right;
}

.reminder-list {
  display: flex;
  flex-direction: column;
}

.reminder-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f0;
  cursor: pointer;
}

.reminder-item:last-child {
  border-bottom: 0;
}

.reminder-date {
  display: grid;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
}

.reminder-date.overdue {
  color: var(--red);
  background: var(--red-soft);
}

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

.reminder-main strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.attention-pill {
  padding: 3px 7px;
  border-radius: 20px;
  color: #b76d17;
  background: var(--orange-soft);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.table-card {
  overflow: hidden;
}

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

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-input {
  width: 220px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 10px;
}

.filter-select {
  min-height: 34px;
  padding: 6px 27px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  color: var(--ink-2);
  background: #fff;
  font-size: 10px;
}

.filter-select:focus {
  border-color: var(--teal);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #f1f5f3;
}

.segmented button {
  min-height: 27px;
  padding: 4px 11px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 7px rgba(25, 48, 58, .08);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th {
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: #87949b;
  background: #fafcfb;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  text-align: left;
}

.data-table td {
  height: 57px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f0;
  color: var(--ink-2);
  font-size: 10px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background .15s;
}

.data-table tbody tr:hover {
  background: #f8fbfa;
}

.data-table .clickable-row {
  cursor: pointer;
}

.data-table .check-col {
  width: 34px;
  padding-right: 2px;
  text-align: center;
}

input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--teal);
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.customer-logo {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--logo-color, var(--teal));
  background: var(--logo-bg, var(--teal-soft));
  font-size: 10px;
  font-weight: 800;
}

.customer-name {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.customer-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.table-primary {
  color: var(--ink);
  font-weight: 700;
}

.table-secondary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--badge-color, var(--teal));
  background: var(--badge-bg, var(--teal-soft));
  font-size: 8px;
  font-weight: 700;
}

.level-badge {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
}

.level-A {
  color: #a48a18;
  background: #f7efcc;
}

.level-B {
  color: #28706a;
  background: #e0f1ef;
}

.level-C {
  color: #557285;
  background: #eaf0f4;
}

.level-D {
  color: #8c7670;
  background: #f2ece9;
}

.tag {
  display: inline-block;
  margin: 1px 2px 1px 0;
  padding: 2px 6px;
  border: 1px solid #e4e9e8;
  border-radius: 4px;
  color: #6c7d84;
  background: #fafcfb;
  font-size: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-action {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #89969c;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.row-action:hover {
  border-color: var(--line);
  color: var(--teal);
  background: #fff;
}

.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.pagination {
  display: flex;
  gap: 4px;
}

.pagination button {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}

.pagination button.active {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.pagination button:disabled {
  cursor: default;
  opacity: .45;
}

.batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-bottom: 1px solid #d6ebe5;
  color: var(--teal-dark);
  background: #ecf8f5;
  font-size: 9px;
}

.batch-bar strong {
  margin-right: auto;
}

.empty-state {
  display: grid;
  min-height: 250px;
  padding: 35px 20px;
  place-items: center;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 13px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 21px;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.empty-state p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-strip > div {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child {
  border-right: 0;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  letter-spacing: -.03em;
}

.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  padding: 13px 1px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.tab-button.active {
  color: var(--teal);
}

.tab-button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 4px;
  background: var(--teal);
}

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

.product-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.product-card:hover,
.product-card.active {
  border-color: #9bcfc5;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card.active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--teal);
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--prod-color, var(--teal));
  background: var(--prod-bg, var(--teal-soft));
}

.product-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.product-trend {
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.product-card h3 {
  margin: 12px 0 2px;
  font-size: 12px;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.product-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f0;
}

.product-stats span {
  color: var(--muted);
  font-size: 8px;
}

.product-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
  gap: 16px;
}

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f0;
  font-size: 10px;
}

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

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

.detail-row > strong {
  font-weight: 600;
}

.detail-row.full {
  grid-template-columns: 1fr;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 10px;
}

.progress-item-head span {
  color: var(--ink-2);
}

.progress-item-head strong {
  font-size: 10px;
}

.linear-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: #edf2f0;
}

.linear-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--progress-color, var(--teal));
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 5px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 25px;
  bottom: 0;
  left: 13px;
  width: 1px;
  background: #dce5e2;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 0 0 1px #d6e6e2;
  font-size: 9px;
}

.timeline-body {
  padding: 2px 0;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-head strong {
  font-size: 10px;
}

.timeline-head time {
  color: var(--muted);
  font-size: 8px;
}

.timeline-body p {
  margin: 4px 0;
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1.7;
}

.timeline-meta {
  color: var(--muted);
  font-size: 8px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 26, 35, .52);
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease;
}

.modal {
  width: min(650px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-strong);
  animation: modalIn .2s ease;
}

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

.modal.xwide {
  width: min(1080px, 100%);
}

.modal.small {
  width: min(440px, 100%);
}

.modal-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}

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

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

.modal-close {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: #f5f7f7;
  cursor: pointer;
  font-size: 17px;
}

.modal-body {
  padding: 19px 22px;
}

.modal-footer {
  position: sticky;
  z-index: 3;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}

.modal-section {
  margin: 20px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.modal-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-section-title h4 {
  margin: 0;
  font-size: 12px;
}

.tag-editor {
  display: flex;
  min-height: 41px;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.tag-editor input {
  min-width: 80px;
  flex: 1;
  border: 0;
  outline: 0;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 9px;
}

.tag-chip button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.form-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.order-items {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.order-item-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) 75px 95px 90px 28px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
}

.order-item-row:last-child {
  border-bottom: 0;
}

.order-item-row input,
.order-item-row select {
  width: 100%;
  min-height: 33px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-size: 10px;
}

.order-item-row .item-total {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.order-total-line {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 12px;
  font-size: 11px;
}

.order-total-line strong {
  color: var(--teal);
  font-size: 18px;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-hero .customer-logo {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  font-size: 14px;
}

.detail-hero h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.detail-hero-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.drawer-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(11, 26, 35, .35);
  animation: fadeIn .18s ease;
}

.drawer {
  position: fixed;
  z-index: 91;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(760px, 94vw);
  overflow-y: auto;
  background: #fff;
  box-shadow: -20px 0 60px rgba(9, 28, 38, .2);
  animation: drawerIn .24s ease;
}

.drawer-head {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}

.drawer-body {
  padding: 20px 22px 40px;
}

.drawer-tabs {
  position: sticky;
  z-index: 3;
  top: 68px;
  display: flex;
  gap: 21px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}

.drawer-panel {
  padding-top: 2px;
}

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

.info-grid > div {
  padding: 11px 13px;
  background: #fff;
}

.info-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
}

.info-grid strong {
  font-size: 10px;
  font-weight: 600;
}

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

.contact-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.contact-card strong {
  display: block;
  font-size: 10px;
}

.contact-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(360px, calc(100vw - 44px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  color: #f3f8f7;
  background: #173441;
  box-shadow: 0 14px 35px rgba(8, 25, 34, .25);
  animation: toastIn .25s ease;
}

.toast.success .toast-icon {
  color: #7cd9c7;
}

.toast.error .toast-icon {
  color: #f59b98;
}

.toast-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 800;
}

.toast strong {
  display: block;
  font-size: 10px;
}

.toast span {
  display: block;
  margin-top: 2px;
  color: rgba(239, 247, 246, .67);
  font-size: 9px;
}

.toast button {
  border: 0;
  color: rgba(255, 255, 255, .55);
  background: transparent;
  cursor: pointer;
}

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

.toolbar-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.date-stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.date-stepper button {
  display: grid;
  width: 33px;
  height: 34px;
  place-items: center;
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
}

.date-stepper button:hover {
  background: var(--teal-soft);
}

.date-stepper input {
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  outline: 0;
  color: var(--ink-2);
  background: #fff;
  font-size: 10px;
}

.worklog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 15px;
  margin-bottom: 15px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s, background .15s;
}

.task-item:hover {
  border-color: #c4d8d3;
  background: #fbfdfc;
}

.task-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #bfcdcb;
  border-radius: 7px;
  color: #fff;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
}

.task-item.completed .task-check {
  border-color: var(--teal);
  background: var(--teal);
}

.task-item.completed .task-main strong {
  color: #8b999e;
  text-decoration: line-through;
}

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

.task-main strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.worklog-summary {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.worklog-date-block {
  display: grid;
  width: 49px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--teal);
  background: var(--teal-soft);
}

.worklog-date-block strong {
  font-size: 13px;
}

.worklog-date-block span {
  margin-top: -6px;
  font-size: 8px;
}

.worklog-summary-text {
  margin: 1px 0 6px !important;
  color: var(--ink) !important;
  font-size: 10px !important;
  font-weight: 600;
  line-height: 1.75;
}

.worklog-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.worklog-sections > div {
  padding: 11px 12px;
  border-radius: 8px;
  background: #f7faf9;
}

.worklog-sections span {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
}

.worklog-sections p {
  margin: 0;
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1.8;
}

.industry-hero {
  display: grid;
  grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr);
  gap: 15px;
  margin-bottom: 15px;
}

.industry-highlight {
  position: relative;
  min-height: 225px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle at 90% 8%, rgba(112, 220, 201, .25), transparent 35%),
    linear-gradient(145deg, #102b3b, #17515a);
}

.industry-highlight small {
  color: #7ad6c6;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.industry-highlight h2 {
  margin: 13px 0 6px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
}

.industry-highlight p {
  max-width: 330px;
  margin: 0;
  color: rgba(240, 248, 246, .64);
  font-size: 9px;
  line-height: 1.8;
}

.industry-hero-stats {
  display: flex;
  gap: 25px;
  margin-top: 25px;
}

.industry-hero-stats span {
  display: block;
  color: rgba(239, 248, 246, .55);
  font-size: 8px;
}

.industry-hero-stats strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 500;
}

.industry-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 2px;
}

.industry-bar-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  font-size: 9px;
}

.industry-bar-row span {
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-bar-row strong {
  color: var(--ink);
  font-size: 9px;
  text-align: right;
}

.ai-modal {
  width: min(690px, 100%);
  height: min(760px, calc(100vh - 48px));
  overflow: hidden;
}

.ai-shell {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.ai-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px;
  color: #fff;
  background: linear-gradient(135deg, #102b3b, #185b61);
}

.ai-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: #103640;
  background: #87ddcf;
  font-size: 10px;
  font-weight: 900;
}

.ai-head-main {
  flex: 1;
}

.ai-head h3 {
  margin: 0;
  font-size: 14px;
}

.ai-head p {
  margin: 2px 0 0;
  color: rgba(239, 248, 246, .62);
  font-size: 8px;
}

.ai-head .modal-close {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.ai-chat {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 131, 112, .055), transparent 28%),
    #f7faf9;
}

.ai-message {
  display: flex;
  gap: 9px;
  margin-bottom: 15px;
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 8px;
  font-weight: 800;
}

.ai-message.user .ai-message-avatar {
  color: #fff;
  background: var(--navy);
}

.ai-bubble {
  max-width: 82%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px 12px 12px 12px;
  color: var(--ink-2);
  background: #fff;
  font-size: 10px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.ai-message.user .ai-bubble {
  border-color: #cfe6e0;
  border-radius: 12px 4px 12px 12px;
  color: #174a44;
  background: #e9f6f2;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ai-action {
  padding: 5px 8px;
  border: 1px solid #cde2dd;
  border-radius: 6px;
  color: var(--teal-dark);
  background: #f4fbf9;
  cursor: pointer;
  font-size: 8px;
}

.ai-quick {
  display: flex;
  gap: 7px;
  padding: 9px 15px 0;
  overflow-x: auto;
  background: #fff;
}

.ai-quick button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-2);
  background: #fff;
  cursor: pointer;
  font-size: 8px;
}

.ai-quick button:hover {
  border-color: #9fcfc4;
  color: var(--teal);
}

.ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 11px 15px 15px;
  background: #fff;
}

.ai-input-wrap textarea {
  min-height: 42px;
  max-height: 105px;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  resize: none;
  font-size: 10px;
}

.ai-input-wrap textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 131, 112, .1);
}

.news-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
  padding: 9px 12px;
  border: 1px solid #d9e6e2;
  border-radius: 8px;
  color: var(--muted);
  background: #f2f9f6;
  font-size: 8px;
}

.news-status-bar > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.news-status-bar strong {
  color: var(--teal-dark);
  font-size: 9px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ea682;
  box-shadow: 0 0 0 4px rgba(46, 166, 130, .1);
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.news-feature {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  margin-bottom: 15px;
  padding: 28px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(118, 221, 202, .2), transparent 28%),
    linear-gradient(145deg, #112d3c, #126168);
  box-shadow: 0 12px 32px rgba(17, 44, 56, .13);
}

.news-feature::after {
  content: "DATA";
  position: absolute;
  right: 25px;
  bottom: -20px;
  color: rgba(255, 255, 255, .035);
  font-family: Georgia, serif;
  font-size: 130px;
  font-weight: 700;
  line-height: 1;
}

.news-feature-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(235, 248, 245, .55);
  font-size: 8px;
}

.news-feature h2 {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 26px 0 11px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.025em;
}

.news-feature p {
  position: relative;
  z-index: 1;
  max-width: 790px;
  margin: 0;
  color: rgba(235, 248, 245, .67);
  font-size: 10px;
  line-height: 1.9;
}

.news-feature-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.news-feature-tags span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 5px;
  color: rgba(239, 249, 247, .68);
  background: rgba(255, 255, 255, .06);
  font-size: 8px;
}

.news-feature > a {
  position: absolute;
  z-index: 2;
  right: 25px;
  bottom: 24px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  text-decoration: none;
  font-size: 9px;
}

.empty-news {
  min-height: 215px;
}

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

.news-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.news-card:hover {
  border-color: #a8cec5;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.news-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--teal);
  font-size: 8px;
  font-weight: 700;
}

.news-source time {
  color: var(--muted);
  font-weight: 400;
}

.news-card h3 {
  margin: 12px 0 8px;
  font-size: 12px;
  line-height: 1.6;
}

.news-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.news-card h3 a:hover {
  color: var(--teal);
}

.news-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.news-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.news-card-footer > a {
  color: var(--teal);
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
}

.news-sources {
  margin-top: 15px;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-2);
  background: #fafcfb;
  text-decoration: none;
  font-size: 9px;
}

.source-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.admin-card {
  min-height: 145px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}

.admin-card:hover {
  border-color: #9bcbbf;
  transform: translateY(-2px);
}

.admin-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
}

.admin-card h3 {
  margin: 15px 0 5px;
  font-size: 12px;
}

.admin-card p {
  min-height: 33px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 9px;
}

.admin-card span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
}

.search-result-group h4 {
  margin: 17px 0 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.search-result:hover {
  background: #f5f8f7;
}

.search-result strong {
  display: block;
  font-size: 10px;
}

.search-result span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 12px;
}

.notification-item strong {
  display: block;
  font-size: 10px;
}

.notification-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.help-text {
  padding: 10px 12px;
  border-radius: 8px;
  color: #60747c;
  background: #f4f8f7;
  font-size: 9px;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.mobile-scrim {
  display: none;
}

body.sidebar-collapsed {
  --sidebar: 78px;
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .sidebar-insight,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .logout-button {
  display: none;
}

body.sidebar-collapsed .sidebar-head {
  flex-direction: column;
  height: 94px;
  justify-content: center;
  gap: 9px;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .nav-item.active::before {
  left: -12px;
}

body.sidebar-collapsed .sidebar-user {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar-toggle span:last-child {
  margin-left: 4px;
}

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

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, .8fr);
  }

  .global-search {
    width: 220px;
  }

  .today-chip {
    display: none;
  }

  .sync-status span {
    display: none;
  }

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

@media (max-width: 900px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 30px 22px;
    background:
      radial-gradient(circle at 90% 0, rgba(20, 131, 112, .1), transparent 30%),
      #f7faf9;
  }

  .sidebar {
    width: 240px;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  body.sidebar-collapsed {
    --sidebar: 0px;
  }

  body.sidebar-collapsed .brand-name,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .nav-section,
  body.sidebar-collapsed .sidebar-insight,
  body.sidebar-collapsed .sidebar-user-info,
  body.sidebar-collapsed .logout-button {
    display: block;
  }

  body.sidebar-collapsed .sidebar-head {
    height: 76px;
    flex-direction: row;
    justify-content: space-between;
  }

  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  body.sidebar-collapsed .sidebar-user {
    justify-content: flex-start;
    padding: 0 18px;
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-scrim.visible {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgba(8, 22, 30, .4);
  }

  .topbar {
    padding: 0 18px;
  }

  .page-content {
    padding: 20px 18px 35px;
  }

  .global-search {
    display: none;
  }

  .dashboard-grid,
  .dashboard-grid.equal,
  .split-grid,
  .industry-hero {
    grid-template-columns: 1fr;
  }

  .worklog-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .topbar {
    height: 67px;
  }

  .topbar h2 {
    font-size: 15px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 21px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    min-height: 108px;
    padding: 14px;
  }

  .metric-value {
    font-size: 22px;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .summary-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

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

  .filter-input {
    width: 100%;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .field-row,
  .field-row.three {
    grid-template-columns: 1fr;
  }

  .order-item-row {
    grid-template-columns: minmax(100px, 1fr) 62px 80px 60px 22px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 94vh;
    border-radius: 16px 16px 0 0;
  }

  .drawer {
    width: 100%;
  }

  .detail-hero-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .info-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .donut-layout {
    flex-direction: column;
  }

  .ai-modal {
    height: min(850px, 96vh);
  }

  .ai-bubble {
    max-width: 88%;
  }

  .industry-bar-row {
    grid-template-columns: 68px minmax(0, 1fr) 72px;
  }

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

  .news-feature {
    padding: 21px;
  }

  .news-feature h2 {
    margin-bottom: 70px;
    font-size: 18px;
  }
}
