:root {
  color-scheme: light;
  --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", var(--font);
  --radius: 12px;
  --sidebar-w: 232px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body[data-product="oa"] {
  color-scheme: light;
  --accent: #d67c59;
  --accent-strong: #b95e3f;
  --accent-soft: #f7e8e0;
  --accent-rgb: 214, 124, 89;
  --bg: #f4f1eb;
  --surface: #fffefb;
  --surface-2: #f8f5ef;
  --surface-3: #eee9df;
  --ink: #1c2c2d;
  --text: #354344;
  --muted: #7b8582;
  --faint: #a5aca8;
  --line: #e0dbd1;
  --line-strong: #d1cabf;
  --side: #133230;
  --side-2: #193d3a;
  --side-text: #d8e7e2;
  --side-muted: #7f9f98;
  --good: #2c8a67;
  --good-soft: #e5f3ec;
  --warning: #be8031;
  --warning-soft: #fbf0dd;
  --danger: #c8544b;
  --danger-soft: #f9e8e5;
  --blue: #4b78bd;
  --blue-soft: #e9eff8;
  --shadow: 0 18px 50px rgba(46, 55, 49, 0.08);
  color: var(--text);
  background: var(--bg);
}

body[data-product="mes"] {
  color-scheme: dark;
  --accent: #50a8ff;
  --accent-strong: #2c8bea;
  --accent-soft: rgba(80, 168, 255, 0.11);
  --accent-rgb: 80, 168, 255;
  --bg: #06101d;
  --surface: #0b1929;
  --surface-2: #0e2033;
  --surface-3: #153049;
  --ink: #eef6ff;
  --text: #c6d7e8;
  --muted: #7791a8;
  --faint: #506b82;
  --line: #18324a;
  --line-strong: #284963;
  --side: #071321;
  --side-2: #0b1c2e;
  --side-text: #d4e4f2;
  --side-muted: #6d879e;
  --good: #49deb0;
  --good-soft: rgba(73, 222, 176, 0.1);
  --warning: #f3c15d;
  --warning-soft: rgba(243, 193, 93, 0.1);
  --danger: #ff8176;
  --danger-soft: rgba(255, 129, 118, 0.1);
  --blue: #72aefe;
  --blue-soft: rgba(114, 174, 254, 0.1);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  color: var(--text);
  background: var(--bg);
}

body[data-product="finance"] {
  color-scheme: light;
  --accent: #bd8a38;
  --accent-strong: #9f6f26;
  --accent-soft: #f6edda;
  --accent-rgb: 189, 138, 56;
  --bg: #f2f2ed;
  --surface: #fff;
  --surface-2: #f8f8f3;
  --surface-3: #ecece4;
  --ink: #172a25;
  --text: #334641;
  --muted: #76827d;
  --faint: #a2aaa5;
  --line: #dfe2db;
  --line-strong: #d0d5cd;
  --side: #102e28;
  --side-2: #173a32;
  --side-text: #dbe9e2;
  --side-muted: #83a096;
  --good: #218468;
  --good-soft: #e3f2eb;
  --warning: #ae7828;
  --warning-soft: #f8eedf;
  --danger: #b9544d;
  --danger-soft: #f7e8e5;
  --blue: #526fa9;
  --blue-soft: #e9edf6;
  --shadow: 0 18px 50px rgba(41, 52, 44, 0.075);
  color: var(--text);
  background: var(--bg);
}

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

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-icon] svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-2);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 38px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.primary-button {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.18);
}

body[data-product="finance"] .primary-button {
  color: #fffdf8;
}

.primary-button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.primary-button svg,
.secondary-button svg {
  width: 15px;
  height: 15px;
}

.text-button,
.link {
  padding: 0;
  border: 0;
  color: var(--accent-strong);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.text-button:hover,
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link {
  font-family: var(--display);
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 13%, transparent);
}

/* Login */
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.18fr) minmax(400px, 0.82fr);
  background: var(--surface-2);
}

.login-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 32px clamp(34px, 6vw, 86px);
  overflow: hidden;
  flex-direction: column;
  color: var(--side-text);
  background:
    radial-gradient(circle at 10% 95%, rgba(var(--accent-rgb), 0.22), transparent 36%),
    linear-gradient(145deg, var(--side), color-mix(in srgb, var(--side) 87%, #000));
}

.login-art::before {
  content: "";
  position: absolute;
  top: -24%;
  right: -22%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.018), 0 0 0 170px rgba(255, 255, 255, 0.012);
}

.login-art-grid {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(130deg, #000, transparent 72%);
}

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

.login-brand > div,
.sidebar-brand > span:last-child {
  display: grid;
}

.login-brand strong {
  color: #f5fbf8;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.login-brand small {
  color: rgba(225, 240, 233, 0.46);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.suite-logo {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  flex: none;
  transform: rotate(-8deg);
}

.suite-logo::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 6px;
}

.suite-logo i {
  border-radius: 2px;
  background: var(--accent);
}

.suite-logo i:nth-child(2) {
  opacity: 0.4;
}

.suite-logo i:nth-child(3) {
  opacity: 0.64;
}

.login-story {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  margin: auto 0;
  padding: 80px 0;
}

.login-eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-eyebrow::before,
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.login-story h1 {
  margin: 20px 0 22px;
  color: #f4fbf7;
  font-size: clamp(46px, 5.3vw, 78px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.login-story h1 em {
  color: var(--accent);
  font-style: normal;
}

.login-story > p {
  max-width: 520px;
  margin: 0;
  color: rgba(226, 239, 233, 0.69);
  font-size: 15px;
  line-height: 1.9;
}

.login-flow {
  display: flex;
  width: min(610px, 100%);
  margin-top: 54px;
  align-items: center;
}

.flow-node {
  display: grid;
  min-width: 125px;
  gap: 2px;
}

.flow-node span {
  color: var(--accent);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.flow-node b {
  color: #eff8f4;
  font-size: 13px;
  font-weight: 500;
}

.flow-node small {
  color: rgba(218, 235, 228, 0.48);
  font-size: 10px;
}

.login-flow > i {
  position: relative;
  height: 1px;
  margin: 0 14px;
  flex: 1;
  background: rgba(255, 255, 255, 0.16);
}

.login-flow > i::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.login-art-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: rgba(220, 237, 229, 0.35);
  font-size: 9px;
}

.login-panel {
  display: grid;
  padding: 34px clamp(28px, 6vw, 78px);
  place-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 34%),
    var(--surface);
}

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

.login-app-mark {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 29px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 18px;
  place-items: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.12);
}

.login-app-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 13px;
}

.login-app-mark span {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-card h2 {
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-card > p {
  margin: 0 0 31px;
  color: var(--muted);
  font-size: 12px;
}

.field {
  display: grid;
  margin-top: 17px;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
}

.field-control {
  display: flex;
  height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  transition: var(--transition);
}

.field-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.field-icon {
  margin-left: 14px;
  color: var(--faint);
}

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

.field-control input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.field-control input::placeholder {
  color: var(--faint);
}

.eye-button {
  display: grid;
  width: 43px;
  height: 100%;
  flex: none;
  border: 0;
  place-items: center;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
}

.eye-button svg {
  width: 17px;
  height: 17px;
}

.login-options {
  display: flex;
  margin: 17px 0 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.login-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.login-options input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.login-options button {
  padding: 0;
  border: 0;
  color: var(--accent-strong);
  background: transparent;
  font-size: inherit;
  cursor: pointer;
}

.login-submit {
  width: 100%;
  height: 49px;
  font-size: 13px;
}

.demo-login {
  display: flex;
  width: 100%;
  height: 44px;
  margin-top: 11px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.demo-login:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.legal {
  display: block;
  margin-top: 19px;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

/* Application shell */
.app-shell {
  display: none;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  background: var(--bg);
}

.app-shell.is-visible {
  display: grid;
}

.login-shell.is-hidden {
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-w);
  padding: 20px 14px 14px;
  flex-direction: column;
  color: var(--side-text);
  background:
    radial-gradient(circle at 10% 100%, rgba(var(--accent-rgb), 0.16), transparent 30%),
    var(--side);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
  display: flex;
  min-height: 42px;
  padding: 0 7px;
  align-items: center;
  gap: 11px;
  color: var(--side-text);
  text-decoration: none;
}

.sidebar-brand .suite-logo {
  width: 22px;
  height: 22px;
  gap: 3px;
}

.sidebar-brand strong {
  color: #f1f8f4;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.sidebar-brand small {
  color: var(--side-muted);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.tenant-switcher {
  display: grid;
  min-height: 53px;
  margin: 18px 0 18px;
  padding: 9px 9px;
  grid-template-columns: 31px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.tenant-badge {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  place-items: center;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
}

.tenant-switcher > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.tenant-switcher small {
  color: var(--side-muted);
  font-size: 8px;
}

.tenant-switcher b {
  overflow: hidden;
  color: var(--side-text);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-switcher > span:last-child {
  color: var(--side-muted);
}

.tenant-switcher svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}

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

.side-nav button {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  color: var(--side-muted);
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.side-nav button > span:first-child {
  font-size: 17px;
}

.side-nav button > span:nth-child(2) {
  flex: 1;
}

.side-nav button:hover {
  color: var(--side-text);
  background: rgba(255, 255, 255, 0.045);
}

.side-nav button.is-active {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.15);
  box-shadow: inset 3px 0 var(--accent);
}

.side-nav .nav-badge {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  place-items: center;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  font-family: var(--display);
  font-size: 9px;
}

.sidebar-bottom {
  display: grid;
  margin-top: auto;
  gap: 12px;
}

.help-card {
  display: grid;
  width: 100%;
  padding: 10px;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: var(--side-text);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.help-symbol {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  place-items: center;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.help-card > span:last-child {
  display: grid;
}

.help-card b {
  font-size: 10px;
  font-weight: 500;
}

.help-card small {
  color: var(--side-muted);
  font-size: 8px;
}

.sidebar-user {
  display: grid;
  padding: 12px 5px 2px;
  grid-template-columns: 34px 1fr 32px;
  align-items: center;
  gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  place-items: center;
  color: #fff4ed;
  background: color-mix(in srgb, var(--accent) 56%, #25322a);
  font-size: 11px;
  font-weight: 600;
}

.sidebar-user > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.sidebar-user b {
  color: var(--side-text);
  font-size: 10px;
  font-weight: 500;
}

.sidebar-user small {
  overflow: hidden;
  color: var(--side-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user .icon-button {
  width: 30px;
  height: 30px;
  color: var(--side-muted);
}

.sidebar-user .icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  grid-column: 2;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 66px;
  padding: 0 28px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(18px);
}

.menu-button {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  white-space: nowrap;
}

.breadcrumb span,
.breadcrumb i {
  color: var(--faint);
  font-style: normal;
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}

.topbar-spacer {
  flex: 1;
}

.global-search {
  display: flex;
  width: min(260px, 23vw);
  height: 36px;
  padding: 0 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--faint);
  background: var(--surface-2);
  font-size: 10px;
  cursor: pointer;
}

.global-search > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.global-search kbd,
.command-input kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--faint);
  background: var(--surface);
  font-family: inherit;
  font-size: 8px;
}

.top-action {
  display: inline-flex;
  height: 36px;
  padding: 0 11px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  font-size: 10px;
  cursor: pointer;
}

.notice-button {
  position: relative;
}

.notice-button i {
  position: absolute;
  top: 3px;
  right: 2px;
  display: grid;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border: 2px solid var(--surface);
  border-radius: 8px;
  place-items: center;
  color: #fff;
  background: var(--danger);
  font-family: var(--display);
  font-size: 7px;
  font-style: normal;
}

.mini-profile {
  display: flex;
  padding: 4px 5px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.mini-profile:hover {
  background: var(--surface-2);
}

.mini-profile > span:last-child {
  display: grid;
  min-width: 70px;
  text-align: left;
}

.mini-profile b {
  font-size: 10px;
  font-weight: 500;
}

.mini-profile small {
  color: var(--muted);
  font-size: 8px;
}

.content {
  width: 100%;
  padding: 29px 32px 50px;
}

.page-view {
  animation: page-in 260ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

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

.page-heading h1 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

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

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

/* Cards and dashboard */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.metric-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 17px;
  grid-template-columns: 35px 1fr;
  gap: 2px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 3px 15px rgba(38, 45, 40, 0.025);
}

.metric-icon {
  display: grid;
  width: 35px;
  height: 35px;
  grid-row: 1 / 4;
  border-radius: 9px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

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

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

.metric-icon.gold {
  color: var(--warning);
  background: var(--warning-soft);
}

.metric-card > span:nth-child(2) {
  color: var(--muted);
  font-size: 10px;
}

.metric-card strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.15;
}

.metric-card strong small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 400;
}

.metric-card em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

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

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 3px 15px rgba(38, 45, 40, 0.025);
}

.panel-heading {
  display: flex;
  min-height: 61px;
  padding: 15px 17px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading .eyebrow {
  font-size: 8px;
}

.panel-heading h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.panel-heading select {
  height: 31px;
  padding: 0 27px 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
}

.collaboration-content {
  display: grid;
  padding: 8px 20px 10px;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 25px;
}

.score-ring {
  position: relative;
  display: grid;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  place-items: center;
  background:
    radial-gradient(circle, var(--surface) 62%, transparent 63%),
    conic-gradient(var(--accent) 88.6%, var(--surface-3) 0);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.score-ring > div {
  display: grid;
  justify-items: center;
}

.score-ring strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
}

.score-ring small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.score-details {
  display: grid;
  gap: 13px;
}

.score-details > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  font-size: 9px;
}

.score-details span {
  color: var(--muted);
}

.score-details b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
}

.score-details em {
  grid-column: 1 / -1;
  color: var(--good);
  font-size: 8px;
  font-style: normal;
}

.week-bars {
  display: flex;
  height: 77px;
  padding: 8px 20px 13px;
  align-items: stretch;
  gap: 12px;
  border-top: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 32px;
}

.week-bars span {
  display: flex;
  height: var(--h);
  min-height: 10px;
  margin-top: auto;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  border-radius: 4px 4px 0 0;
  color: #fff;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 52%, transparent), var(--accent));
  font-size: 7px;
}

body[data-product="mes"] .week-bars span {
  color: #041320;
}

.agenda-list {
  display: grid;
  padding: 2px 17px 13px;
}

.agenda-list button {
  display: grid;
  padding: 11px 0;
  grid-template-columns: 39px 9px 1fr;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.agenda-list button:first-child {
  border-top: 0;
}

.agenda-list button:hover span b {
  color: var(--accent-strong);
}

.agenda-list time {
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
}

.agenda-list button > i {
  position: relative;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.agenda-list button > span {
  display: grid;
  min-width: 0;
}

.agenda-list em {
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-list b {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-list.large {
  padding-right: 20px;
  padding-left: 20px;
}

.agenda-list.large button {
  padding: 16px 0;
}

.bulletin-list {
  display: grid;
  padding: 0 17px 13px;
}

.bulletin-list button {
  display: grid;
  padding: 12px 0;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.bulletin-date {
  display: grid;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  place-items: center;
  align-content: center;
  background: var(--surface-2);
}

.bulletin-date b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1;
}

.bulletin-date small {
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
}

.bulletin-list button > span:last-child {
  display: grid;
}

.bulletin-list em {
  color: var(--accent-strong);
  font-size: 8px;
  font-style: normal;
}

.bulletin-list b {
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
}

.bulletin-list small {
  color: var(--muted);
  font-size: 8px;
}

.badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 8px;
  white-space: nowrap;
}

.badge.soft {
  color: var(--muted);
  background: var(--surface-2);
}

/* Tables */
.table-panel {
  margin-top: 14px;
}

.table-panel .panel-heading {
  padding-bottom: 13px;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 10px;
}

th {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}

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

tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 3%, var(--surface));
}

td b {
  display: block;
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.status {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 8px;
  white-space: nowrap;
}

.status.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

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

.status.done {
  color: var(--good);
  background: var(--good-soft);
}

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

.status.neutral {
  color: var(--muted);
  background: var(--surface-2);
}

.small-action {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--surface);
  font-size: 9px;
  cursor: pointer;
}

.small-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-search {
  display: flex;
  width: 220px;
  height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
}

.table-search.large {
  width: 260px;
  height: 38px;
}

.table-search > span {
  margin: 0 8px;
  color: var(--faint);
}

.table-search svg {
  width: 13px;
  height: 13px;
}

.table-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding-right: 8px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 9px;
}

.table-tools select {
  height: 32px;
  padding: 0 26px 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
}

.progress {
  display: inline-block;
  width: 72px;
  height: 4px;
  margin-right: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
  vertical-align: middle;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* Tasks */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kanban-column {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.kanban-column > header {
  display: flex;
  padding: 2px 2px 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

.kanban-column > header b {
  display: grid;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 500;
}

.kanban-column > button:not(.add-task) {
  display: grid;
  width: 100%;
  margin-bottom: 9px;
  padding: 12px;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(36, 42, 37, 0.035);
  cursor: pointer;
}

.kanban-column > button:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.task-tag {
  color: var(--accent-strong);
  font-size: 8px;
}

.kanban-column > button > b {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.kanban-column > button > small {
  color: var(--muted);
  font-size: 8px;
}

.task-avatars {
  display: flex;
  margin-top: 5px;
}

.task-avatars i {
  display: grid;
  width: 22px;
  height: 22px;
  margin-right: -5px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  place-items: center;
  color: var(--text);
  background: var(--surface-3);
  font-size: 7px;
  font-style: normal;
}

.add-task {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

/* Calendar */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(470px, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.calendar-panel {
  padding: 14px;
}

.calendar-head {
  display: flex;
  padding: 4px 2px 16px;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.calendar-head h2 {
  min-width: 150px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  text-align: center;
}

.calendar-week,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-week span {
  padding: 9px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.calendar-days span {
  position: relative;
  display: grid;
  min-height: 67px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  place-items: center;
  color: var(--text);
  font-family: var(--display);
  font-size: 11px;
}

.calendar-days span:nth-child(7n) {
  border-right: 0;
}

.calendar-days .muted {
  color: var(--faint);
  background: var(--surface-2);
}

.calendar-days .today {
  color: #fff;
  background: var(--accent);
}

.calendar-days .today::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.43);
  border-radius: 6px;
}

.calendar-days .today i {
  position: absolute;
  bottom: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

/* Documents */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.folder-grid button {
  display: grid;
  padding: 18px;
  grid-template-columns: 40px 1fr;
  gap: 3px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.folder-grid button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.folder-icon {
  display: grid;
  width: 40px;
  height: 40px;
  grid-row: 1 / 4;
  border-radius: 9px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
}

.folder-icon svg {
  width: 19px;
  height: 19px;
}

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

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

.folder-icon.gold {
  color: var(--warning);
  background: var(--warning-soft);
}

.folder-grid b {
  align-self: end;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

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

/* People */
.org-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.org-summary article {
  display: grid;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.org-summary strong {
  margin: 3px 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
}

.org-summary small {
  color: var(--muted);
  font-size: 8px;
}

.people-panel {
  margin-top: 14px;
}

.people-grid {
  display: grid;
  padding: 0 17px 17px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.person {
  display: grid;
  padding: 16px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.avatar.large {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 15px;
  font-size: 17px;
}

.avatar.blue {
  background: #4f77ae;
}

.avatar.gold {
  background: #b48741;
}

.avatar.green {
  background: #3a876c;
}

.person b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

.person small,
.person em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.person em {
  margin: 4px 0 10px;
}

.person button {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--surface);
  font-size: 8px;
  cursor: pointer;
}

/* Admin services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.service-grid button {
  display: grid;
  padding: 19px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.service-grid button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.service-symbol {
  display: grid;
  width: 39px;
  height: 39px;
  margin-bottom: 6px;
  border-radius: 10px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
}

.service-symbol svg {
  width: 19px;
  height: 19px;
}

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

.service-symbol.green {
  color: var(--good);
  background: var(--good-soft);
}

.service-symbol.gold {
  color: var(--warning);
  background: var(--warning-soft);
}

.service-grid b {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

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

.service-grid em {
  margin-top: 7px;
  color: var(--accent-strong);
  font-size: 9px;
  font-style: normal;
}

/* Notifications, modal, toast */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  background: rgba(11, 18, 16, 0.34);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: 200ms ease;
}

.overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(390px, 92vw);
  padding-bottom: 18px;
  visibility: hidden;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(30, 38, 33, 0.14);
  transform: translateX(102%);
  transition: 230ms ease;
}

.notification-panel.is-open {
  visibility: visible;
  transform: none;
}

.panel-head {
  display: flex;
  padding: 22px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.notification-list {
  display: grid;
  padding: 8px 17px;
}

.notification-list button {
  display: grid;
  padding: 13px 5px;
  grid-template-columns: 35px 1fr;
  align-items: start;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.notification-icon {
  display: grid;
  width: 33px;
  height: 33px;
  border-radius: 8px;
  place-items: center;
  color: var(--warning);
  background: var(--warning-soft);
}

.notification-icon svg {
  width: 15px;
  height: 15px;
}

.notification-icon.calendar {
  color: var(--blue);
  background: var(--blue-soft);
}

.notification-icon.document {
  color: var(--good);
  background: var(--good-soft);
}

.notification-list button > span:last-child {
  display: grid;
  gap: 2px;
}

.notification-list b {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.notification-list small {
  color: var(--muted);
  font-size: 9px;
}

.notification-list em {
  color: var(--faint);
  font-size: 8px;
  font-style: normal;
}

.panel-all {
  width: calc(100% - 34px);
  margin: 10px 17px;
}

.command-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  padding-top: 14vh;
  justify-content: center;
  background: rgba(12, 20, 18, 0.42);
  backdrop-filter: blur(5px);
}

.command-modal.is-open {
  display: flex;
}

.command-box {
  width: min(560px, calc(100vw - 30px));
  height: max-content;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(22, 30, 26, 0.28);
}

.command-input {
  display: flex;
  height: 50px;
  padding: 0 10px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.command-input > span {
  color: var(--accent);
}

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

.command-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.command-caption {
  display: block;
  padding: 12px 10px 4px;
  color: var(--faint);
  font-size: 8px;
}

.command-box > button {
  display: grid;
  width: 100%;
  padding: 10px;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.command-box > button:hover {
  background: var(--surface-2);
}

.command-box > button > span:first-child {
  color: var(--accent);
}

.command-box > button span:last-child {
  display: grid;
  font-size: 10px;
}

.command-box > button small {
  color: var(--muted);
  font-size: 8px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  width: min(340px, calc(100vw - 30px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  padding: 12px 14px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 10px;
  animation: toast-in 220ms ease both;
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast > span {
  color: var(--good);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

/* MES-specific visualization augmentations */
body[data-product="mes"] .content {
  background:
    radial-gradient(circle at 50% 10%, rgba(80, 168, 255, 0.055), transparent 30%),
    var(--bg);
}

body[data-product="mes"] .metric-card,
body[data-product="mes"] .panel {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

body[data-product="mes"] .week-bars span {
  box-shadow: 0 0 14px rgba(80, 168, 255, 0.12);
}

body[data-product="mes"] .score-ring {
  background:
    radial-gradient(circle, var(--surface) 62%, transparent 63%),
    conic-gradient(var(--accent) 86.4%, var(--surface-3) 0);
}

body[data-product="mes"] .login-art {
  background:
    radial-gradient(circle at 15% 90%, rgba(80, 168, 255, 0.26), transparent 35%),
    linear-gradient(145deg, #071321, #020a13);
}

body[data-product="mes"] .login-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(80, 168, 255, 0.08), transparent 36%),
    #091625;
}

body[data-product="mes"] .login-card h2 {
  color: var(--ink);
}

body[data-product="mes"] .login-card > p {
  color: var(--muted);
}

/* Finance-specific refinements */
body[data-product="finance"] .metric-card,
body[data-product="finance"] .panel {
  box-shadow: 0 4px 18px rgba(45, 51, 42, 0.035);
}

body[data-product="finance"] .login-art {
  background:
    radial-gradient(circle at 12% 88%, rgba(189, 138, 56, 0.25), transparent 35%),
    linear-gradient(145deg, #102e28, #071c18);
}

/* MES production views */
.shift-indicator,
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.line-overview-panel {
  min-height: 362px;
}

.line-floor {
  position: relative;
  display: grid;
  min-height: 218px;
  margin: 0 15px;
  padding: 34px 22px 22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.09), transparent 50%),
    var(--surface-2);
  isolation: isolate;
}

.line-floor.large {
  min-height: 310px;
  margin-bottom: 14px;
}

.floor-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  transform: perspective(300px) rotateX(43deg) scale(1.3);
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: 23px 23px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 77%);
}

.line-track {
  position: absolute;
  top: 57%;
  right: 7%;
  left: 7%;
  height: 2px;
  background: linear-gradient(90deg, var(--good), var(--accent), var(--warning));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.28);
}

.line-track::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--accent);
  animation: track-flow 7s linear infinite;
}

@keyframes track-flow {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 7px);
  }
}

.station {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 132px;
  padding: 18px 9px 10px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.station.active {
  border-color: color-mix(in srgb, var(--good) 28%, var(--line));
}

.station.warning {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--line));
}

.station.paused {
  opacity: 0.7;
}

.station-index {
  position: absolute;
  top: 7px;
  left: 8px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.station-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 3px 0 9px;
  border-radius: 8px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.station.warning .station-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.station-icon svg {
  width: 17px;
  height: 17px;
}

.station b {
  overflow: hidden;
  max-width: 100%;
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station small {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station em {
  margin-top: 7px;
  color: var(--good);
  font-family: var(--display);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.station.warning em {
  color: var(--warning);
}

.station.paused em {
  color: var(--muted);
}

.line-stats {
  display: grid;
  margin: 14px 15px 15px;
  padding-top: 13px;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.line-stats > span {
  display: grid;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.line-stats > span:first-child {
  border-left: 0;
}

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

.line-stats b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
}

.line-stats em {
  color: var(--good);
  font-size: 7px;
  font-style: normal;
}

.exception-panel {
  min-height: 362px;
}

.exception-list {
  display: grid;
  padding: 2px 17px 0;
}

.exception-list button {
  display: grid;
  padding: 13px 0;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.exception-list button:first-child {
  border-top: 0;
}

.exception-level {
  display: grid;
  width: 23px;
  height: 23px;
  border-radius: 5px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 8px;
}

.exception-level.mid {
  color: var(--warning);
  background: var(--warning-soft);
}

.exception-list button > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.exception-list b {
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-list em {
  color: var(--accent-strong);
  font-size: 8px;
  font-style: normal;
}

.exception-footer {
  display: flex;
  margin: 4px 17px 0;
  padding-top: 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.exception-footer b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
}

.oee-list {
  display: grid;
  padding: 0 17px 16px;
  gap: 13px;
}

.oee-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 9px;
}

.oee-list span {
  display: grid;
}

.oee-list b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
}

.oee-list small {
  color: var(--muted);
  font-size: 7px;
}

.oee-list em {
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 10px;
  font-style: normal;
}

.oee-list > div > i {
  display: block;
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.oee-list > div > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent), var(--accent));
}

.line-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
  gap: 14px;
}

.device-health {
  display: grid;
  margin: 12px 17px 17px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.device-health > span {
  color: var(--muted);
  font-size: 8px;
}

.device-health strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
}

.device-health > i {
  height: 4px;
  margin: 4px 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.device-health > i b {
  display: block;
  height: 100%;
  background: var(--good);
}

.device-health small {
  color: var(--good);
  font-size: 7px;
}

.quality-layout {
  margin-top: 14px;
}

.trace-card {
  padding: 2px 18px 20px;
}

.trace-hash {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: var(--display);
  font-size: 8px;
}

.trace-card h3 {
  margin: 11px 0 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

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

.trace-chain {
  display: grid;
  margin-top: 22px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trace-chain > span {
  position: relative;
  display: grid;
  padding-top: 17px;
}

.trace-chain > span::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-strong);
}

.trace-chain i {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.trace-chain .done i {
  background: var(--good);
}

.trace-chain .active i {
  background: var(--warning);
}

.trace-chain b {
  color: var(--ink);
  font-size: 8px;
  font-weight: 500;
}

.trace-chain small {
  color: var(--muted);
  font-size: 7px;
}

.defect-bars {
  display: grid;
  padding: 7px 17px 17px;
  gap: 16px;
}

.defect-bars > div {
  display: grid;
  grid-template-columns: 80px 1fr 28px;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 8px;
}

.defect-bars i {
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.defect-bars i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--warning) 60%, transparent), var(--warning));
}

.defect-bars em {
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.device-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.device-hero article {
  display: grid;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

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

.device-hero strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
}

.device-hero small {
  color: var(--muted);
  font-size: 8px;
}

.material-board {
  margin-top: 14px;
}

.material-list {
  display: grid;
  padding: 0 17px 15px;
}

.material-list > div {
  display: grid;
  padding: 13px 0;
  grid-template-columns: 65px minmax(180px, 1fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.material-list > div:first-child {
  border-top: 0;
}

.material-list > div > span:nth-child(2) {
  display: grid;
}

.material-list b {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.material-list small,
.material-list em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.report-hero {
  display: grid;
  padding: 22px;
  grid-template-columns: 160px minmax(300px, 1fr) 250px;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.mes-score {
  width: 145px;
  height: 145px;
}

.mes-score strong {
  font-size: 33px;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px 25px;
}

.report-stats > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
}

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

.report-stats b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
}

.report-stats i {
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.report-stats i em {
  display: block;
  height: 100%;
  background: var(--accent);
}

.shift-distribution {
  display: grid;
  padding: 15px;
  grid-template-columns: 1fr auto;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}

.shift-distribution b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
}

.shift-distribution small {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 7px;
}

.warning-text {
  color: var(--warning) !important;
}

/* Finance views */
.period-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  white-space: nowrap;
}

.period-indicator svg {
  width: 13px;
  height: 13px;
}

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

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 9px;
  height: 2px;
  background: var(--accent);
}

.legend span:nth-child(2) i {
  background: var(--blue);
}

.legend b {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  font-weight: 400;
}

.finance-chart-panel {
  min-height: 388px;
}

.finance-chart {
  display: grid;
  height: 244px;
  padding: 23px 18px 14px;
  grid-template-columns: 28px 1fr;
  gap: 5px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 48px;
  background-position-y: 23px;
}

.chart-y {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--display);
  font-size: 7px;
}

.chart-series {
  display: flex;
  height: 100%;
  align-items: flex-end;
  gap: clamp(5px, 1vw, 11px);
}

.chart-series > div {
  position: relative;
  display: flex;
  height: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.chart-series i,
.chart-series b {
  display: block;
  width: 45%;
  max-width: 15px;
  height: var(--in);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 30%, transparent), var(--accent));
}

.chart-series b {
  height: var(--out);
  background: linear-gradient(to top, color-mix(in srgb, var(--blue) 22%, transparent), var(--blue));
  opacity: 0.72;
}

.chart-series .current i {
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.22);
}

.chart-series span {
  position: absolute;
  bottom: -17px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
}

.finance-summary {
  display: grid;
  margin: 0 16px 15px;
  padding-top: 13px;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.finance-summary > span {
  display: grid;
  padding: 0 13px;
  border-left: 1px solid var(--line);
}

.finance-summary > span:first-child {
  border-left: 0;
}

.finance-summary small {
  color: var(--muted);
  font-size: 8px;
}

.finance-summary b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
}

.finance-summary em {
  color: var(--good);
  font-size: 7px;
  font-style: normal;
}

.receipt-list {
  display: grid;
  padding: 0 17px 4px;
}

.receipt-list button {
  display: grid;
  padding: 12px 0;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.receipt-list button:first-child {
  border-top: 0;
}

.customer-initial {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  place-items: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 500;
}

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

.customer-initial.green {
  color: var(--good);
  background: var(--good-soft);
}

.receipt-list button > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.receipt-list b {
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
}

.receipt-list small,
.receipt-list em {
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

.receipt-list strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
}

.receipt-list em {
  grid-column: 3;
  color: var(--good);
  text-align: right;
}

.collection-rate {
  display: grid;
  margin: 7px 17px 16px;
  padding: 13px;
  grid-template-columns: 1fr auto;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.collection-rate span,
.collection-rate small {
  color: var(--muted);
  font-size: 8px;
}

.collection-rate strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
}

.collection-rate > i {
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.collection-rate > i b {
  display: block;
  height: 100%;
  background: var(--good);
}

.collection-rate small {
  grid-column: 1 / -1;
  font-size: 7px;
}

.aging-grid {
  display: grid;
  padding: 2px 17px 11px;
  gap: 15px;
}

.aging-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
}

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

.aging-grid strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
}

.aging-grid i {
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.aging-grid i b {
  display: block;
  height: 100%;
  background: var(--accent);
}

.aging-grid .danger i b {
  background: var(--danger);
}

.aging-tip {
  display: flex;
  margin: 3px 17px 16px;
  padding: 11px;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  color: var(--warning);
  background: var(--warning-soft);
}

.aging-tip > span:first-child {
  font-size: 17px;
}

.aging-tip > span:last-child {
  display: grid;
}

.aging-tip b {
  font-size: 8px;
  font-weight: 500;
}

.aging-tip small {
  color: var(--muted);
  font-size: 7px;
}

.report-period {
  height: 38px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  font-size: 10px;
}

.cost-hero,
.budget-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.cost-hero article,
.budget-hero > div {
  display: grid;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cost-hero span,
.budget-hero span {
  color: var(--muted);
  font-size: 9px;
}

.cost-hero strong,
.budget-hero strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
}

.cost-hero small,
.budget-hero small {
  color: var(--muted);
  font-size: 8px;
}

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

.cost-pie {
  display: grid;
  padding: 8px 20px 22px;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 24px;
}

.pie-ring {
  display: grid;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  place-items: center;
  background: conic-gradient(var(--accent) 0 48%, #4d78a5 48% 72%, #789d79 72% 88%, #9a8068 88% 100%);
}

.pie-ring > div {
  display: grid;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  place-items: center;
  align-content: center;
  background: var(--surface);
}

.pie-ring strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
}

.pie-ring small {
  color: var(--muted);
  font-size: 8px;
}

.cost-legend-list {
  display: grid;
  gap: 12px;
}

.cost-legend-list span {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.cost-legend-list i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.cost-legend-list b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 500;
}

.margin-list {
  display: grid;
  padding: 2px 17px 17px;
  gap: 15px;
}

.margin-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
}

.margin-list span {
  color: var(--text);
  font-size: 9px;
}

.margin-list strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
}

.margin-list i {
  height: 4px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
}

.margin-list i b {
  display: block;
  height: 100%;
  background: var(--good);
}

.margin-list em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

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

.statement-card {
  position: relative;
  padding: 19px;
}

.statement-code {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 9px;
}

.statement-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  border-radius: 9px;
  place-items: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.statement-icon svg {
  width: 20px;
  height: 20px;
}

.statement-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.statement-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 8px;
}

.statement-card > div {
  display: grid;
  padding: 11px 0;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.statement-card > div b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
}

.statement-card > button {
  display: inline-flex;
  margin-top: 13px;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: 0;
  color: var(--accent-strong);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.revenue-trend {
  display: flex;
  height: 250px;
  padding: 30px 30px 26px;
  align-items: flex-end;
  gap: clamp(16px, 4vw, 48px);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 50px;
}

.revenue-trend > div {
  position: relative;
  display: flex;
  height: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.revenue-trend i,
.revenue-trend b {
  display: block;
  width: 35%;
  max-width: 30px;
  height: var(--a);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 28%, transparent), var(--accent));
}

.revenue-trend b {
  height: var(--b);
  background: linear-gradient(to top, color-mix(in srgb, var(--blue) 24%, transparent), var(--blue));
}

.revenue-trend span {
  position: absolute;
  bottom: -18px;
  color: var(--muted);
  font-size: 8px;
}

.budget-hero {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.budget-hero > div > i {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-3);
}

.budget-hero > div > i b {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* Responsive */
@media (max-width: 1200px) {
  :root {
    --sidebar-w: 210px;
  }

  .content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .global-search {
    display: none;
  }

  .dashboard-grid,
  .lower-grid,
  .calendar-layout,
  .line-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .report-hero {
    grid-template-columns: 160px 1fr;
  }

  .shift-distribution {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: 220ms ease;
  }

  .sidebar.is-open {
    transform: none;
    box-shadow: 20px 0 50px rgba(15, 25, 20, 0.25);
  }

  .workspace {
    min-height: 100vh;
  }

  .menu-button {
    display: grid;
  }

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

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

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

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 58px;
    padding: 0 12px;
  }

  .breadcrumb span,
  .breadcrumb i {
    display: none;
  }

  .top-action,
  .mini-profile > span:last-child {
    display: none;
  }

  .content {
    padding: 20px 13px 40px;
  }

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

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

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

  .metric-card {
    padding: 13px;
    grid-template-columns: 30px 1fr;
    gap: 2px 8px;
  }

  .metric-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .metric-card strong {
    font-size: 22px;
  }

  .dashboard-grid,
  .lower-grid {
    display: block;
  }

  .dashboard-grid > *,
  .lower-grid > * {
    margin-bottom: 12px;
  }

  .collaboration-content {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .score-details {
    width: 100%;
  }

  .week-bars {
    height: 68px;
    gap: 6px;
  }

  .panel-heading {
    padding-right: 13px;
    padding-left: 13px;
  }

  .table-tools {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .table-search {
    width: 100%;
  }

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

  .kanban,
  .folder-grid,
  .service-grid,
  .org-summary,
  .people-grid,
  .device-hero {
    grid-template-columns: 1fr;
  }

  .cost-hero,
  .budget-hero,
  .statement-grid {
    grid-template-columns: 1fr;
  }

  .folder-grid button {
    grid-template-columns: 40px 1fr;
  }

  .calendar-panel {
    overflow-x: auto;
  }

  .calendar-week,
  .calendar-days {
    min-width: 520px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions > button {
    flex: 1;
  }

  .login-panel {
    padding: 28px 21px;
  }

  .login-card h2 {
    font-size: 25px;
  }

  .line-floor {
    min-height: 210px;
    padding-right: 10px;
    padding-left: 10px;
    gap: 5px;
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(88px, 1fr));
  }

  .station {
    min-height: 124px;
  }

  .line-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
  }

  .line-stats > span:nth-child(3) {
    border-left: 0;
  }

  .material-list > div {
    grid-template-columns: 1fr auto;
  }

  .material-list > div > span:nth-child(2) {
    grid-column: 1;
  }

  .material-list > div > em {
    grid-column: 1 / -1;
  }

  .report-hero {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .report-stats {
    width: 100%;
  }

  .trace-chain {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(80px, 1fr));
  }

  .finance-summary {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .finance-summary > span {
    padding: 0;
    border-left: 0;
  }

  .finance-chart {
    overflow-x: auto;
  }

  .chart-series {
    min-width: 560px;
  }

  .cost-pie {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .cost-legend-list {
    width: 100%;
  }

  .revenue-trend {
    gap: 11px;
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
