*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --primary-ghost: rgba(15, 118, 110, 0.1);
  --secondary: #c2410c;
  --secondary-light: #ffedd5;
  --success: #15803d;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --ink: #162033;
  --gray-50: #f7f8fc;
  --gray-100: #edf1f7;
  --gray-200: #d8dfeb;
  --gray-300: #b7c2d6;
  --gray-400: #7e8aa3;
  --gray-500: #5e6b85;
  --gray-600: #41506c;
  --gray-700: #2d3950;
  --gray-800: #1d2738;
  --gray-900: #0f1727;
  --text-muted: var(--gray-400);
  --sidebar-width: 276px;
  --header-height: 76px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --shadow: 0 14px 40px rgba(15, 23, 39, 0.08);
  --shadow-md: 0 20px 50px rgba(15, 23, 39, 0.12);
  --shadow-lg: 0 28px 80px rgba(15, 23, 39, 0.18);
  --border: 1px solid rgba(135, 150, 176, 0.22);
}

html { font-size: 14px; }

body {
  min-height: 100vh;
  font-family: "Segoe UI Variable", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--gray-800);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(194, 65, 12, 0.11), transparent 24%),
    linear-gradient(180deg, #f5f7fb 0%, #eef3f9 52%, #f8fafc 100%);
  line-height: 1.5;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.25), transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(251, 146, 60, 0.18), transparent 22%),
    linear-gradient(135deg, #0f172a 0%, #0f766e 54%, #134e4a 100%);
}

.login-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -80px auto auto -20px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.16), transparent 68%);
  pointer-events: none;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gray-900);
  margin-top: 16px;
}

.login-logo p {
  color: var(--gray-500);
  font-size: 0.92rem;
  margin-top: 8px;
}

.login-logo .logo-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 18px 45px rgba(15, 118, 110, 0.24);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sidebar-header .brand-lockup {
  width: 100%;
  padding: 14px 16px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.92), rgba(12, 28, 47, 0.82));
  border: 1px solid rgba(78, 101, 132, 0.34);
  box-shadow: 0 18px 32px rgba(4, 10, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.brand-lockup.centered {
  align-items: center;
}
.brand-logo {
  display: block;
  height: auto;
}
.brand-logo.sidebar {
  width: 170px;
  max-width: 100%;
}
.brand-logo.login {
  width: 188px;
  max-width: 100%;
}
.brand-logo.topbar {
  width: 116px;
  max-width: 100%;
}
.brand-kicker {
  font-size: 0.73rem;
  color: rgba(199, 210, 254, 0.68);
  margin-top: 2px;
}
.brand-kicker.login {
  color: var(--gray-500);
  font-size: 0.92rem;
  margin-top: 6px;
}
.login-note {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(194, 65, 12, 0.08));
  color: var(--gray-600);
  font-size: 0.82rem;
  text-align: center;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background:
    radial-gradient(circle at top, rgba(45, 212, 191, 0.12), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 110;
  padding: 16px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 18px 0 60px rgba(15, 23, 39, 0.18);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 26px 26px 0;
  pointer-events: none;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-header,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.sidebar-header {
  padding: 14px 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.28);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.sidebar-subtitle {
  font-size: 0.73rem;
  color: rgba(199, 210, 254, 0.68);
  margin-top: 3px;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding: 18px 0 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
  padding: 12px 14px 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 4px;
  margin: 3px 6px;
  padding: 11px 14px;
  color: rgba(226, 232, 240, 0.82);
  text-decoration: none;
  border-radius: 14px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 56px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(19, 78, 74, 0.96));
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.22);
}

.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.62);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: rgba(226, 232, 240, 0.72);
  cursor: pointer;
  padding: 7px;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-logout:hover {
  background: rgba(220, 38, 38, 0.14);
  color: #fff;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 39, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 105;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(135, 150, 176, 0.2);
  display: flex;
  align-items: center;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 70;
  gap: 16px;
}

.topbar-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gray-900);
  flex: 1;
  letter-spacing: 0.01em;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.topbar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-brand-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: 0.01em;
}

.topbar-brand-subtitle {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sidebar-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(135, 150, 176, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--gray-700);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.content {
  padding: 28px;
  flex: 1;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 24px 26px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 32%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(194, 65, 12, 0.12));
  border: var(--border);
  box-shadow: var(--shadow);
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  top: -48px;
  right: -34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 65, 12, 0.18), transparent 68%);
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.page-hero-text {
  max-width: 760px;
  color: var(--gray-600);
  font-size: 0.94rem;
}

.workflow-scope-card {
  padding: 10px;
}

.workflow-scope-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-scope-tab {
  border: 1px solid rgba(135, 150, 176, 0.24);
  background: rgba(255, 255, 255, 0.82);
  color: var(--gray-600);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.workflow-scope-tab:hover {
  transform: translateY(-1px);
  color: var(--gray-800);
  box-shadow: var(--shadow);
}

.workflow-scope-tab.active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(19, 78, 74, 0.98));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}

.workflow-items-editor {
  display: grid;
  gap: 14px;
}

.workflow-item-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 248, 252, 0.9), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(135, 150, 176, 0.18);
}

.workflow-remove-item {
  width: 100%;
}

.table-main {
  font-weight: 700;
  color: var(--gray-800);
}

.table-sub {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.product-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.product-identity.is-empty {
  opacity: 0.9;
}

.product-identity-body {
  min-width: 0;
}

.product-identity-title {
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.25;
}

.product-identity-subtitle {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.3;
}

.product-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(214, 223, 238, 0.9);
  background: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
  display: block;
}

.product-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  border: 1px solid rgba(214, 223, 238, 0.9);
  background: var(--gray-100);
  font-size: 18px;
  flex: 0 0 auto;
}

.product-select-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(214, 223, 238, 0.9);
  background: rgba(248, 250, 252, 0.78);
}

.modal-static-value .badge {
  display: inline-flex;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

#admin-editor-overlay .modal.modal-bpmn-editor {
  width: min(1360px, calc(100vw - 32px));
  max-width: min(1360px, calc(100vw - 32px));
}

.bpmn-designer-shell {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.88), rgba(255, 255, 255, 0.98));
}

.bpmn-designer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.bpmn-designer-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.bpmn-steps-list,
.bpmn-visual-preview {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  min-height: 420px;
}

.bpmn-steps-list {
  display: grid;
  gap: 12px;
  max-height: 720px;
  overflow: auto;
}

.bpmn-step-editor {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fcfdff;
  cursor: grab;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bpmn-step-editor.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.bpmn-step-editor.is-drop-target {
  border-color: rgba(21, 128, 101, 0.45);
  box-shadow: 0 0 0 3px rgba(21, 128, 101, 0.12);
}

.bpmn-step-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.bpmn-step-editor-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpmn-step-fields {
  display: grid;
  gap: 8px;
}

.bpmn-visual-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  background-image: radial-gradient(rgba(25, 47, 89, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
}

.bpmn-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
}

.bpmn-role-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.bpmn-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.bpmn-role-pill-employee,
.bpmn-visual-step-role-employee .bpmn-visual-node {
  background: linear-gradient(180deg, #effcf7, #dbf7eb);
  border-color: rgba(22, 163, 74, 0.24);
}

.bpmn-role-pill-manager,
.bpmn-visual-step-role-manager .bpmn-visual-node {
  background: linear-gradient(180deg, #eef6ff, #dbeafe);
  border-color: rgba(37, 99, 235, 0.24);
}

.bpmn-role-pill-finance,
.bpmn-visual-step-role-finance .bpmn-visual-node {
  background: linear-gradient(180deg, #fff8eb, #ffedd5);
  border-color: rgba(234, 88, 12, 0.24);
}

.bpmn-role-pill-warehouse,
.bpmn-visual-step-role-warehouse .bpmn-visual-node {
  background: linear-gradient(180deg, #eff6ff, #e0f2fe);
  border-color: rgba(8, 145, 178, 0.24);
}

.bpmn-role-pill-procurement,
.bpmn-visual-step-role-procurement .bpmn-visual-node {
  background: linear-gradient(180deg, #faf5ff, #f3e8ff);
  border-color: rgba(147, 51, 234, 0.24);
}

.bpmn-role-pill-receiver,
.bpmn-visual-step-role-receiver .bpmn-visual-node {
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
  border-color: rgba(249, 115, 22, 0.24);
}

.bpmn-role-pill-signer,
.bpmn-visual-step-role-signer .bpmn-visual-node {
  background: linear-gradient(180deg, #fdf2f8, #fce7f3);
  border-color: rgba(219, 39, 119, 0.24);
}

.bpmn-role-pill-custom,
.bpmn-visual-step-role-custom .bpmn-visual-node {
  background: linear-gradient(180deg, #ffffff, #f3faf8);
  border-color: rgba(21, 128, 101, 0.24);
}

.bpmn-flow-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.bpmn-flow-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.bpmn-flow-index {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.bpmn-visual-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.bpmn-visual-node {
  min-width: 240px;
  max-width: 320px;
  border-radius: 20px;
  border: 1px solid rgba(21, 128, 101, 0.24);
  background: linear-gradient(180deg, #ffffff, #f3faf8);
  box-shadow: 0 14px 34px rgba(18, 74, 64, 0.08);
  padding: 18px 20px;
  text-align: center;
}

.bpmn-visual-step-start .bpmn-visual-node,
.bpmn-visual-step-end .bpmn-visual-node {
  min-width: 140px;
  max-width: 140px;
  min-height: 140px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #effcf7, #dbf7eb);
}

.bpmn-visual-step-end .bpmn-visual-node {
  background: linear-gradient(180deg, #f5fbff, #dceefd);
}

.bpmn-visual-step-gateway .bpmn-visual-node {
  transform: rotate(45deg);
  border-radius: 24px;
  min-width: 170px;
  max-width: 170px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff8eb, #ffe9c8);
}

.bpmn-visual-step-gateway .bpmn-visual-name {
  transform: rotate(-45deg);
}

.bpmn-visual-name {
  font-weight: 800;
  color: var(--text);
}

.bpmn-visual-role {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.bpmn-gateway-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(720px, 100%);
}

.bpmn-gateway-branch {
  border: 1px dashed rgba(21, 128, 101, 0.28);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.bpmn-gateway-branch-label {
  min-width: 48px;
  justify-content: center;
}

.bpmn-gateway-branch-center {
  border-style: solid;
  border-color: rgba(25, 47, 89, 0.16);
  background: rgba(248, 250, 252, 0.94);
  justify-content: center;
  text-align: center;
}

.bpmn-gateway-condition {
  font-weight: 700;
  color: var(--text);
}

.bpmn-gateway-branch-yes {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(240, 253, 244, 0.88);
}

.bpmn-gateway-branch-no {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(255, 251, 235, 0.92);
}

.bpmn-visual-arrow {
  font-size: 28px;
  color: rgba(25, 47, 89, 0.5);
  line-height: 1;
}

.bpmn-xml-details {
  margin-top: 16px;
}

.bpmn-xml-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.bpmn-designer-grid-v2 {
  grid-template-columns: minmax(360px, 0.78fr) minmax(560px, 1.22fr);
}

.bpmn-step-editor.is-selected {
  border-color: rgba(21, 128, 101, 0.5);
  box-shadow: 0 0 0 3px rgba(21, 128, 101, 0.12);
}

.bpmn-step-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.bpmn-visual-preview-canvas {
  gap: 12px;
}

.bpmn-canvas-hint {
  border: 1px dashed rgba(25, 47, 89, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  color: var(--muted);
}

.bpmn-canvas-hint.is-active {
  border-color: rgba(21, 128, 101, 0.4);
  color: var(--text);
}

.bpmn-canvas-stage {
  position: relative;
  height: 1560px;
  border: 1px solid rgba(214, 223, 238, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,249,252,0.98));
  overflow: hidden;
}

.bpmn-canvas-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bpmn-canvas-connector {
  fill: none;
  stroke: rgba(25, 47, 89, 0.35);
  stroke-width: 3;
  stroke-linecap: round;
}

.bpmn-canvas-connector-yes {
  stroke: rgba(22, 163, 74, 0.5);
}

.bpmn-canvas-connector-no {
  stroke: rgba(245, 158, 11, 0.52);
}

.bpmn-canvas-connector-label {
  font-size: 12px;
  font-weight: 800;
  fill: rgba(25, 47, 89, 0.72);
  text-anchor: middle;
}

.bpmn-canvas-node {
  position: absolute;
  width: 250px;
  min-height: 110px;
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(21, 128, 101, 0.2);
  background: linear-gradient(180deg, #ffffff, #f5faf8);
  box-shadow: 0 16px 34px rgba(18, 74, 64, 0.08);
  cursor: grab;
  user-select: none;
}

.bpmn-canvas-node.is-selected {
  box-shadow: 0 0 0 3px rgba(21, 128, 101, 0.14), 0 18px 38px rgba(18, 74, 64, 0.12);
}

.bpmn-canvas-node.is-connecting-source {
  border-color: rgba(21, 128, 101, 0.52);
}

.bpmn-canvas-node-start,
.bpmn-canvas-node-end {
  width: 140px;
  min-height: 140px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.bpmn-canvas-node-start {
  background: linear-gradient(180deg, #effcf7, #dbf7eb);
}

.bpmn-canvas-node-end {
  background: linear-gradient(180deg, #f5fbff, #dceefd);
}

.bpmn-canvas-node-gateway {
  width: 170px;
  min-height: 170px;
  transform: rotate(45deg);
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff8eb, #ffe9c8);
}

.bpmn-canvas-node-gateway > * {
  transform: rotate(-45deg);
}

.bpmn-canvas-node-title {
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.bpmn-canvas-node-role {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.bpmn-canvas-node-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bpmn-node-end-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.bpmn-canvas-node-role-employee { background: linear-gradient(180deg, #effcf7, #dbf7eb); }
.bpmn-canvas-node-role-manager { background: linear-gradient(180deg, #eef6ff, #dbeafe); }
.bpmn-canvas-node-role-finance { background: linear-gradient(180deg, #fff8eb, #ffedd5); }
.bpmn-canvas-node-role-warehouse { background: linear-gradient(180deg, #eff6ff, #e0f2fe); }
.bpmn-canvas-node-role-procurement { background: linear-gradient(180deg, #faf5ff, #f3e8ff); }
.bpmn-canvas-node-role-receiver { background: linear-gradient(180deg, #fff7ed, #ffedd5); }
.bpmn-canvas-node-role-signer { background: linear-gradient(180deg, #fdf2f8, #fce7f3); }

@media (max-width: 1180px) {
  .bpmn-designer-grid {
    grid-template-columns: 1fr;
  }

  .bpmn-steps-list,
  .bpmn-visual-preview {
    min-height: 320px;
  }

  .bpmn-gateway-branches {
    grid-template-columns: 1fr;
  }
}

.admin-multiselect {
  min-height: 156px;
}

.page-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(135, 150, 176, 0.18);
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 600;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.card-subtitle {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
  border: var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -22px -48px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.08), transparent 70%);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.stat-icon.blue { background: rgba(15, 118, 110, 0.12); color: var(--primary); }
.stat-icon.green { background: rgba(21, 128, 61, 0.12); color: var(--success); }
.stat-icon.yellow { background: rgba(217, 119, 6, 0.12); color: var(--warning); }
.stat-icon.red { background: rgba(220, 38, 38, 0.12); color: var(--danger); }

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.stat-label {
  font-size: 0.84rem;
  color: var(--gray-500);
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.24);
}

.btn-primary:hover { box-shadow: 0 18px 30px rgba(15, 118, 110, 0.3); }

.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.78);
  color: var(--gray-700);
  border: 1px solid rgba(135, 150, 176, 0.24);
}

.btn-outline:hover {
  background: #fff;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 12px;
}

.btn-icon {
  padding: 8px;
  border-radius: 12px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-label span.required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
}

.form-control:focus {
  border-color: rgba(15, 118, 110, 0.58);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  background: #fff;
}

.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 92px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(135, 150, 176, 0.16);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.72);
}

th {
  text-align: left;
  padding: 13px 14px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: rgba(237, 241, 247, 0.88);
  border-bottom: 1px solid rgba(135, 150, 176, 0.18);
}

td {
  padding: 14px;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-bottom: 1px solid rgba(216, 223, 235, 0.7);
}

tr:last-child td { border-bottom: none; }

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.92);
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-blue { background: rgba(15, 118, 110, 0.12); color: var(--primary); }
.badge-green { background: rgba(21, 128, 61, 0.12); color: var(--success); }
.badge-red { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.badge-yellow { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.badge-gray { background: rgba(148, 163, 184, 0.14); color: var(--gray-600); }
.badge-purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 39, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: min(720px, calc(100vw - 40px)); }
.modal-xl { max-width: min(1180px, calc(100vw - 40px)); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(216, 223, 235, 0.8);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: rgba(237, 241, 247, 0.85);
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.modal-close:hover { color: var(--gray-700); }
.modal-body { padding: 22px 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(216, 223, 235, 0.8);
}

.alert {
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.86rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success { background: var(--success-light); color: #15803d; border-color: #bbf7d0; }
.alert-danger { background: var(--danger-light); color: #b91c1c; border-color: #fecaca; }
.alert-warning { background: var(--warning-light); color: #b45309; border-color: #fde68a; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-color: rgba(15, 118, 110, 0.18); }

#toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  font-weight: 700;
  min-width: 280px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
}

.empty-state {
  text-align: center;
  padding: 54px 24px;
  color: var(--gray-400);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state p { font-size: 0.9rem; }

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 120px 140px 36px;
  gap: 8px;
  align-items: end;
  padding: 14px;
  background: rgba(248, 250, 252, 0.9);
  border-radius: 16px;
  border: 1px solid rgba(216, 223, 235, 0.9);
}

.btn-remove-item {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  font-size: 1rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-remove-item:hover {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
}

.image-upload-area {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(135, 150, 176, 0.45);
  background: rgba(248, 250, 252, 0.72);
}

.low-stock-row td { background: #fff8f8; }

.low-stock-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 6px;
}

.tab-bar {
  display: inline-flex;
  gap: 6px;
  background: rgba(237, 241, 247, 0.85);
  padding: 6px;
  border-radius: 18px;
  margin-bottom: 20px;
  width: fit-content;
  border: 1px solid rgba(216, 223, 235, 0.8);
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 700;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.tab-panel { display: none; }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-400); }
.text-small { font-size: 0.8rem; }
.fw-600 { font-weight: 600; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--gray-400);
  gap: 10px;
}

.dept-balance-table th:first-child,
.dept-balance-table td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
}

.product-card-meta {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 640px) {
  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .page-hero {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .page-hero-title {
    font-size: 1.35rem;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 14px 16px;
    min-height: 68px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-brand {
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-logo.topbar {
    width: 96px;
  }

  .topbar-brand-title {
    font-size: 0.98rem;
  }

  .topbar-brand-subtitle {
    font-size: 0.74rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .stat-card,
  .modal {
    border-radius: 20px;
  }

  .item-row {
    grid-template-columns: 1fr;
  }

  .tab-bar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}




.sidebar-header .brand-kicker {
  color: var(--gray-500);
  margin-top: 4px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-chip {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(135, 150, 176, 0.18);
  box-shadow: var(--shadow);
}

.summary-chip-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.summary-chip-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gray-900);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

.hero-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.hero-panel-text {
  font-size: 0.86rem;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.hero-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-checkitem {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--gray-700);
}

.hero-checkitem strong {
  color: var(--gray-900);
}

.hero-checkicon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary);
  flex-shrink: 0;
}

.stat-card .stat-trend {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-accent {
  position: relative;
}

.card-accent::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.9), rgba(194, 65, 12, 0.6));
}

.card-accent > * {
  position: relative;
  z-index: 1;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--gray-700);
  font-size: 0.74rem;
  font-weight: 700;
}

.table-status.warning {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

@media (max-width: 1180px) {
  .dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.topbar-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.hero-panel-text {
  color: var(--gray-600);
  font-size: 0.86rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.86fr);
  gap: 22px;
  align-items: start;
}

.hero-checklist {
  display: grid;
  gap: 12px;
}

.hero-checkitem {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--gray-700);
  font-size: 0.85rem;
}

.hero-checkicon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.hero-panel-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.hero-panel-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 39, 0.05);
  color: var(--gray-600);
  font-size: 0.76rem;
  font-weight: 700;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-chip {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(135, 150, 176, 0.18);
  box-shadow: var(--shadow);
}

.summary-chip-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.summary-chip-value {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--gray-800);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.quick-action-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  text-decoration: none;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
  border: 1px solid rgba(135, 150, 176, 0.18);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 118, 110, 0.28);
}

.quick-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.quick-action-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.quick-action-body strong {
  color: var(--gray-900);
  font-size: 0.95rem;
}

.quick-action-body span {
  color: var(--gray-500);
  font-size: 0.82rem;
  line-height: 1.45;
}

.stat-trend {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.card-accent {
  position: relative;
  overflow: hidden;
}

.card-accent::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.28), rgba(194, 65, 12, 0.16), transparent);
}

.table-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 18px;
  color: var(--gray-400);
  font-size: 0.88rem;
}

.table-placeholder-icon {
  font-size: 1rem;
}

.table-empty-state {
  text-align: center;
  padding: 28px 20px;
}

.table-empty-state.success {
  background: rgba(240, 253, 244, 0.7);
}

.table-empty-state.warning {
  background: rgba(255, 251, 235, 0.74);
}

.table-empty-icon {
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.table-empty-title {
  color: var(--gray-900);
  font-size: 0.92rem;
  font-weight: 800;
}

.table-empty-text {
  max-width: 420px;
  margin: 6px auto 0;
  color: var(--gray-500);
  font-size: 0.82rem;
  line-height: 1.5;
}

.table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.table-status.warning {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

@media (max-width: 1180px) {
  .hero-layout,
  .quick-actions-grid,
  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .topbar-status {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .quick-action-card {
    width: 100%;
  }
}


.sidebar-header {
  padding: 14px 12px 18px;
  align-items: stretch;
}

.sidebar-header .brand-lockup {
  width: 100%;
  padding: 14px 16px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.92), rgba(12, 28, 47, 0.82));
  border: 1px solid rgba(78, 101, 132, 0.34);
  box-shadow: 0 18px 32px rgba(4, 10, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.sidebar-header .brand-logo.sidebar {
  width: 170px;
}

.sidebar-header .brand-kicker {
  color: rgba(191, 209, 230, 0.72);
  margin-top: 6px;
  font-size: 0.68rem;
  line-height: 1.45;
  max-width: 180px;
}

.sidebar-header .brand-lockup.sidebar-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.92), rgba(12, 28, 47, 0.82));
  border: 1px solid rgba(78, 101, 132, 0.34);
  box-shadow: 0 18px 32px rgba(4, 10, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.sidebar-header .brand-lockup.sidebar-brand-mark .brand-logo.sidebar {
  width: 170px;
  max-width: 100%;
}

.sidebar-header .brand-lockup.sidebar-brand-mark .brand-kicker {
  display: none;
}

.topbar-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(135, 150, 176, 0.2);
}

.topbar-datetime-date {
  font-size: 0.76rem;
  color: var(--gray-500);
}

.topbar-datetime-time {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hero-metric-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 39, 0.05);
  border: 1px solid rgba(135, 150, 176, 0.16);
}

.hero-metric-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.hero-metric-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-900);
}

.summary-chip {
  text-decoration: none;
}

.summary-chip-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.45;
}

.summary-chip.success {
  background: rgba(240, 253, 244, 0.86);
  border-color: rgba(34, 197, 94, 0.2);
}

.summary-chip.warning {
  background: rgba(255, 251, 235, 0.92);
  border-color: rgba(245, 158, 11, 0.24);
}

.summary-chip.danger {
  background: rgba(254, 242, 242, 0.92);
  border-color: rgba(239, 68, 68, 0.22);
}

.summary-chip.success .summary-chip-value { color: var(--success); }
.summary-chip.warning .summary-chip-value { color: var(--warning); }
.summary-chip.danger .summary-chip-value { color: var(--danger); }

.priority-panel {
  margin-bottom: 20px;
}

.dashboard-role-shell,
.dashboard-executive-shell {
  margin-bottom: 20px;
}

.dashboard-role-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.dashboard-role-mode,
.dashboard-executive-summary {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(246, 249, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.14);
}

.dashboard-role-mode-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-role-mode-text {
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.55;
    color: var(--gray-600);
}

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

.marketplace-summary-card {
  padding: 18px 20px;
}

.marketplace-summary-value {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
}

.marketplace-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.marketplace-chip {
  border: 1px solid rgba(21, 86, 128, 0.12);
  background: #fff;
  color: var(--gray-700);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.marketplace-chip.is-active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.14), rgba(21, 86, 128, 0.14));
  color: var(--primary-700);
  border-color: rgba(13, 148, 136, 0.35);
}

.products-marketplace-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.marketplace-card {
  border: 1px solid rgba(21, 86, 128, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 253, 0.96));
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.marketplace-card.is-unavailable {
  opacity: 0.72;
}

.marketplace-card-media {
  position: relative;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 224px;
  background: linear-gradient(180deg, rgba(226, 239, 246, 0.55), rgba(255, 255, 255, 0.9));
}

.marketplace-card-thumb,
.marketplace-card-thumb.product-thumb,
.marketplace-card-thumb.product-thumb-fallback {
  width: 184px !important;
  height: 184px !important;
  border-radius: 22px;
}

.marketplace-card-category,
.marketplace-card-flag {
  position: absolute;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 10px;
}

.marketplace-card-category {
  top: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gray-700);
}

.marketplace-card-flag {
  bottom: 12px;
}

.marketplace-card-flag.is-low {
  background: rgba(249, 115, 22, 0.16);
  color: #c2410c;
}

.marketplace-card-flag.is-ok {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}

.marketplace-card-body {
  padding: 18px 18px 12px;
}

.marketplace-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.marketplace-card-sku {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.marketplace-card-price {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-700);
}

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

.marketplace-card-stats div {
  border: 1px solid rgba(21, 86, 128, 0.08);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
}

.marketplace-card-stats span {
  display: block;
  font-size: 0.74rem;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.marketplace-card-stats strong {
  font-size: 0.95rem;
  color: var(--gray-900);
}

.marketplace-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.marketplace-card-actions {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 0 18px 18px;
}

.marketplace-card-qty {
  min-height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 86, 128, 0.07);
  font-weight: 800;
  color: var(--gray-900);
}

.marketplace-cart-card {
  position: sticky;
  top: 24px;
}

.marketplace-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow: auto;
}

.marketplace-cart-line,
.marketplace-request-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(21, 86, 128, 0.08);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.marketplace-cart-line-actions {
  display: grid;
  grid-template-columns: 38px 52px 38px;
  gap: 8px;
  align-items: center;
}

.marketplace-cart-summary {
  margin-top: 14px;
  border-top: 1px solid rgba(21, 86, 128, 0.08);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marketplace-cart-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.marketplace-cart-footer .btn {
  flex: 1;
}

.marketplace-empty {
  min-height: 240px;
  border: 1px dashed rgba(21, 86, 128, 0.18);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
}

.marketplace-empty-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.marketplace-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.marketplace-empty-text {
  margin-top: 6px;
  max-width: 340px;
}

.marketplace-request-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marketplace-request-line-qty {
  min-width: 92px;
  text-align: right;
  font-weight: 700;
  color: var(--gray-900);
}

@media (max-width: 1280px) {
  .products-marketplace-layout {
    grid-template-columns: 1fr;
  }

  .marketplace-cart-card {
    position: static;
  }
}

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

  .marketplace-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

.dashboard-role-links {
  display: grid;
  gap: 10px;
}

.dashboard-role-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(135, 150, 176, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-role-link:hover,
.dashboard-bar-link:hover,
.dashboard-risk-item:hover,
.dashboard-dept-row:hover,
.dashboard-forecast-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.22);
}

.dashboard-executive-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-executive-panels {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dashboard-executive-panel {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(246, 249, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.14);
}

.dashboard-executive-panel-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.dashboard-executive-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-executive-module-card {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.94);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.dashboard-executive-module-card.success {
  background: rgba(240, 253, 244, 0.94);
  border-color: rgba(34, 197, 94, 0.18);
}

.dashboard-executive-module-card.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.18);
}

.dashboard-executive-module-card.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-executive-module-card.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-executive-module-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  font-weight: 800;
}

.dashboard-executive-module-value {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-executive-module-note {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--gray-600);
}

.dashboard-workflow-sla {
  display: grid;
  gap: 10px;
}

.dashboard-sla-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-sla-pill {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(239, 246, 255, 0.94);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dashboard-sla-pill.success {
  background: rgba(240, 253, 244, 0.94);
  border-color: rgba(34, 197, 94, 0.18);
}

.dashboard-sla-pill.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.18);
}

.dashboard-sla-pill.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-sla-pill.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-sla-pill span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-500);
  font-weight: 800;
}

.dashboard-sla-pill strong {
  font-size: 1.2rem;
  color: var(--gray-900);
}

.dashboard-executive-pill {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.94);
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-executive-pill.success {
  background: rgba(240, 253, 244, 0.94);
  border-color: rgba(34, 197, 94, 0.18);
}

.dashboard-executive-pill.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.18);
}

.dashboard-executive-pill.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-executive-pill.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-executive-pill span {
  font-size: 0.76rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.dashboard-executive-pill strong {
  font-size: 1.3rem;
  color: var(--gray-900);
}

.dashboard-executive-pill small {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.priority-panel-body {
  display: grid;
  gap: 14px;
}

.priority-message {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(194, 65, 12, 0.08));
  color: var(--gray-800);
  font-weight: 700;
}

.priority-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.priority-item,
.priority-empty {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(216, 223, 235, 0.85);
}

.priority-empty.success {
  background: rgba(240, 253, 244, 0.86);
}

.priority-empty.warning {
  background: rgba(255, 251, 235, 0.9);
}

.priority-item-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.priority-item-text,
.priority-empty {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.alert-action {
  justify-content: space-between;
  align-items: center;
}

.quick-actions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .priority-insights,
  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .hero-search,
  .priority-insights,
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .topbar-datetime {
    align-items: flex-start;
  }
}

.sidebar {
  padding: 16px 12px;
}

.sidebar-header {
  padding: 8px 10px 14px;
  border-bottom: none;
}

.sidebar-overview {
  position: relative;
  z-index: 1;
  margin: 0 10px 16px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8, 17, 33, 0.9), rgba(13, 33, 59, 0.78));
  border: 1px solid rgba(78, 101, 132, 0.28);
  box-shadow: 0 18px 34px rgba(4, 10, 23, 0.22);
}

.sidebar-overview-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.72);
  margin-bottom: 8px;
}

.sidebar-overview-value {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.sidebar-overview-text {
  margin-top: 8px;
  font-size: 0.79rem;
  line-height: 1.5;
  color: rgba(191, 209, 230, 0.74);
}

.sidebar-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sidebar-pill.success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.sidebar-pill.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.sidebar-pill.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.sidebar-nav {
  padding: 10px 0 12px;
}

.nav-section-title {
  padding: 14px 14px 8px;
}

.nav-item {
  margin: 4px 4px;
  padding: 12px 14px;
  gap: 10px;
}

.nav-item-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.nav-item-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: rgba(191, 209, 230, 0.56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active .nav-item-hint,
.nav-item:hover .nav-item-hint {
  color: rgba(236, 253, 245, 0.78);
}

.nav-badge {
  align-self: start;
  justify-self: end;
  margin-left: 4px;
  max-width: 76px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sidebar-footer {
  padding: 12px 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user {
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-session {
  margin-top: 4px;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.68);
}

.btn-logout {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .sidebar-overview {
    margin-right: 8px;
    margin-left: 8px;
  }

  .nav-item-hint,
  .nav-badge,
  .sidebar-user-session {
    display: none;
  }
}

.sidebar-dashboard .sidebar-overview {
  margin-bottom: 12px;
}

.sidebar-mini-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 10px 14px;
}

.sidebar-mini-stat {
  padding: 10px 10px 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-mini-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.7);
}

.sidebar-mini-value {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.sidebar-shortcuts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 10px 14px;
  flex-shrink: 0;
}

.sidebar-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.84);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.sidebar-shortcut:hover {
  background: rgba(15, 118, 110, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.sidebar-dashboard .nav-item {
  position: relative;
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.sidebar-dashboard .nav-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.18s ease;
}

.sidebar-dashboard .nav-item.active::before {
  background: rgba(255, 255, 255, 0.92);
}

.sidebar-dashboard .nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-dashboard .nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .sidebar-mini-stats {
    grid-template-columns: 1fr 1fr 1fr;
    margin-right: 8px;
    margin-left: 8px;
  }

  .sidebar-shortcuts {
    margin-right: 8px;
    margin-left: 8px;
  }
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.login-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.login-panel-brand {
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(71, 201, 109, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(8, 17, 33, 0.96), rgba(12, 32, 58, 0.88));
  color: #f8fafc;
}

.login-brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-brand-mark {
  width: 220px;
  max-width: 100%;
  margin-top: 22px;
}

.login-brand-title {
  margin-top: 26px;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.06;
  font-weight: 900;
}

.login-brand-text {
  margin-top: 14px;
  max-width: 460px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(226, 232, 240, 0.78);
}

.login-feature-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(241, 245, 249, 0.88);
}

.login-panel-form {
  padding: 34px;
  background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-panel-brand,
  .login-panel-form {
    padding: 28px;
  }
}

.toolbar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-control-sm {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
}

.inventory-variance {
  font-weight: 800;
  color: var(--gray-500);
}

.inventory-variance.positive {
  color: var(--success);
}

.inventory-variance.negative {
  color: var(--danger);
}

.audit-details {
  max-width: 320px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--gray-500);
  font-size: 0.78rem;
}

@media (max-width: 960px) {
  .toolbar-grid-3 {
    grid-template-columns: 1fr;
  }
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gray-700);
  font-weight: 600;
}

.switch-row input {
  width: 18px;
  height: 18px;
}

.enterprise-stats {
  margin-top: -4px;
}

.document-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.document-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.document-viewer-body {
  display: grid;
  gap: 16px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-field {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(216, 223, 235, 0.9);
}

.document-field span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.document-field strong {
  color: var(--gray-900);
  line-height: 1.45;
}

.document-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.document-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 251, 235, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.16);
  color: #92400e;
  font-size: 0.84rem;
}

.enterprise-focus-panel {
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .document-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-main-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  display: grid;
  gap: 18px;
}

.stats-grid-primary {
  margin-bottom: 0;
}

.stat-card-emphasis {
  min-height: 132px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 252, 0.94));
}

.dashboard-surface-grid {
  margin-bottom: 0;
}

.dashboard-side-panel {
  margin-bottom: 0;
}

.dashboard-side-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.stat-card-compact {
  min-height: 0;
  padding: 18px;
  border-radius: 22px;
}

.stat-card-compact .stat-value {
  font-size: 1.55rem;
}

.stat-card-compact .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.dashboard-ops-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 252, 0.96));
}

.dashboard-link-stack {
  display: grid;
  gap: 10px;
}

.dashboard-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--gray-700);
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.16);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dashboard-link-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.24);
}

.dashboard-link-row span {
  color: var(--gray-500);
  font-size: 0.88rem;
}

.dashboard-link-row strong {
  color: var(--primary-dark);
  white-space: nowrap;
  font-size: 0.92rem;
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-chart-card {
  min-height: 320px;
}

.dashboard-donut-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.dashboard-donut-shell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-donut {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(#0f766e 0 70%, #f59e0b 70% 85%, #3b82f6 85% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px rgba(15, 23, 39, 0.08);
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 28px;
}

.dashboard-donut-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-donut-label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-legend {
  display: grid;
  gap: 12px;
}

.dashboard-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(246, 249, 252, 0.94);
  border: 1px solid rgba(135, 150, 176, 0.14);
}

.dashboard-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 5px;
}

.dashboard-legend-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-legend-note {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.45;
}

.dashboard-legend-metric {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-legend-metric strong {
  font-size: 1rem;
  color: var(--gray-900);
}

.dashboard-legend-metric span {
  font-size: 0.74rem;
  color: var(--gray-500);
}

.dashboard-legend-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(246, 249, 252, 0.94);
  border: 1px dashed rgba(135, 150, 176, 0.24);
  color: var(--gray-500);
  font-size: 0.84rem;
}

.dashboard-bar-chart {
  display: grid;
  gap: 14px;
}

.dashboard-bar-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(246, 249, 252, 0.94);
  border: 1px solid rgba(135, 150, 176, 0.14);
}

.dashboard-bar-link,
.dashboard-risk-item,
.dashboard-dept-row,
.dashboard-forecast-item {
  text-decoration: none;
  color: inherit;
}

.dashboard-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-bar-label {
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-bar-value {
  font-size: 0.94rem;
  color: var(--gray-700);
}

.dashboard-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.dashboard-bar-fill {
  height: 100%;
  border-radius: inherit;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.28);
}

.dashboard-bar-caption {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.dashboard-gantt {
  display: grid;
  gap: 14px;
}

.dashboard-gantt-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-gantt-lanes {
  display: grid;
  gap: 12px;
}

.dashboard-gantt-row {
  display: grid;
  gap: 8px;
}

.dashboard-gantt-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}

.dashboard-gantt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-gantt-note {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.dashboard-gantt-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      to right,
      rgba(148, 163, 184, 0.1) 0,
      rgba(148, 163, 184, 0.1) calc(16.66% - 1px),
      rgba(255, 255, 255, 0.92) calc(16.66% - 1px),
      rgba(255, 255, 255, 0.92) 16.66%
    );
  overflow: hidden;
}

.dashboard-gantt-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bar-color) 16%, white);
  border: 1px solid color-mix(in srgb, var(--bar-color) 50%, white);
  overflow: hidden;
}

.dashboard-gantt-progress {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 70%, white));
}

.dashboard-intelligence-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-intel-card,
.dashboard-trend-card {
  min-height: 280px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-kpi-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-kpi-card.success {
  background: rgba(240, 253, 244, 0.92);
  border-color: rgba(34, 197, 94, 0.2);
}

.dashboard-kpi-card.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.22);
}

.dashboard-kpi-card.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.22);
}

.dashboard-kpi-card.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.2);
}

.dashboard-kpi-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 800;
}

.dashboard-kpi-value {
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-kpi-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.dashboard-heatmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-heat-cell {
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-heat-cell.success {
  background: rgba(240, 253, 244, var(--heat-alpha, 0.2));
  border-color: rgba(34, 197, 94, 0.18);
}

.dashboard-heat-cell.warning {
  background: rgba(255, 251, 235, var(--heat-alpha, 0.22));
  border-color: rgba(245, 158, 11, 0.18);
}

.dashboard-heat-cell.danger {
  background: rgba(254, 242, 242, var(--heat-alpha, 0.24));
  border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-heat-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
}

.dashboard-heat-score {
  margin-top: 8px;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-heat-note {
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.dashboard-trend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-trend-panel {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-trend-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.dashboard-trend-body {
  min-height: 120px;
  display: flex;
  align-items: center;
}

.dashboard-trend-bars {
  width: 100%;
  height: 120px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.dashboard-trend-bar-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.dashboard-trend-bar {
  width: 100%;
  min-height: 12px;
  border-radius: 12px 12px 6px 6px;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-trend-axis-label {
  font-size: 0.7rem;
  color: var(--gray-500);
}

.dashboard-trend-inline {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.8);
}

.dashboard-trend-inline.success {
  background: rgba(240, 253, 244, 0.88);
}

\.dashboard-trend-inline.info {`r`n  background: rgba(239, 246, 255, 0.9);`r`n}`r`n`r`n.dashboard-trend-inline.warning {
  background: rgba(255, 251, 235, 0.88);
}

.dashboard-trend-inline.danger {
  background: rgba(254, 242, 242, 0.9);
}

.dashboard-trend-inline strong {
  font-size: 1.7rem;
  color: var(--gray-900);
}

.dashboard-trend-inline span {
  font-size: 0.84rem;
  color: var(--gray-600);
}

.dashboard-trend-note {
  margin-top: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--gray-500);
}

.dashboard-executive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-branch-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-executive-card {
  min-height: 320px;
}

.dashboard-risk-list,
.dashboard-dept-chart,
.dashboard-forecast-list,
.dashboard-branch-list,
.dashboard-deficit-days {
  display: grid;
  gap: 12px;
}

.dashboard-risk-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-risk-item.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.22);
}

.dashboard-risk-item.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.22);
}

.dashboard-risk-item.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-risk-rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  background: rgba(15, 23, 39, 0.08);
  color: var(--gray-800);
}

.dashboard-risk-title,
.dashboard-forecast-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-risk-text,
.dashboard-forecast-text {
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--gray-600);
}

.dashboard-risk-meta {
  font-size: 0.72rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.dashboard-dept-row {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(246, 249, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.14);
}

.dashboard-dept-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-dept-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-dept-value {
  font-size: 0.88rem;
  color: var(--gray-700);
}

.dashboard-dept-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.dashboard-dept-fill {
  height: 100%;
  border-radius: inherit;
}

.dashboard-dept-fill.tone-1 { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.dashboard-dept-fill.tone-2 { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.dashboard-dept-fill.tone-3 { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.dashboard-dept-fill.tone-4 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.dashboard-forecast-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-forecast-item.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.22);
}

.dashboard-forecast-item.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.22);
}

.dashboard-forecast-item.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

.dashboard-branch-item,
.dashboard-deficit-item {
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(135, 150, 176, 0.14);
  background: rgba(246, 249, 252, 0.96);
}

.dashboard-branch-title,
.dashboard-deficit-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-branch-meta,
.dashboard-deficit-text {
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.dashboard-branch-stats {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.dashboard-deficit-days-value {
  margin-top: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dashboard-deficit-item.danger {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.22);
}

.dashboard-deficit-item.warning {
  background: rgba(255, 251, 235, 0.94);
  border-color: rgba(245, 158, 11, 0.2);
}

.dashboard-deficit-item.info {
  background: rgba(239, 246, 255, 0.94);
  border-color: rgba(59, 130, 246, 0.18);
}

@media (max-width: 1260px) {
  .dashboard-main-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-side-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-intelligence-grid,
  .dashboard-trend-grid,
  .dashboard-executive-grid,
  .dashboard-branch-grid,
  .dashboard-executive-panels,
  .dashboard-executive-module-grid,
  .dashboard-sla-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-role-grid,
  .dashboard-executive-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-side-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-link-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-donut-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-gantt-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-kpi-grid,
  .dashboard-heatmap {
    grid-template-columns: 1fr;
  }

  .dashboard-trend-bars {
    gap: 6px;
  }

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

  .dashboard-risk-meta {
    white-space: normal;
  }
}

.app-icon-host {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-icon-svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-icon .app-icon-svg,
.quick-action-icon .app-icon-svg,
.stat-icon .app-icon-svg,
.table-placeholder-icon .app-icon-svg,
.hero-pill-icon .app-icon-svg {
  width: 18px;
  height: 18px;
}

.sidebar-dashboard .nav-icon {
  color: rgba(226, 232, 240, 0.88);
  font-size: 0;
}

.sidebar-dashboard .nav-item.active .nav-icon,
.sidebar-dashboard .nav-item:hover .nav-icon {
  color: #ffffff;
}

.quick-action-icon,
.stat-icon,
.table-placeholder-icon,
.hero-pill-icon {
  font-size: 0;
}

.quick-action-icon {
  color: var(--primary-dark);
}

.stat-icon {
  color: var(--primary-dark);
}

.stat-icon.red {
  color: #dc2626;
}

.stat-icon.green {
  color: #15803d;
}

.stat-icon.yellow {
  color: #b45309;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-dark);
}

.table-placeholder-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.8);
  color: var(--gray-500);
}

.quick-action-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 252, 0.95));
}

.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 252, 0.96));
}

.report-filters-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 252, 0.96));
}

.report-filters-grid {
  align-items: end;
}

.report-filter-actions {
  flex-wrap: wrap;
}

.report-view-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.report-filter-group {
  transition: opacity .2s ease;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.tab-btn-icon .app-icon-svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 960px) {
  .report-view-row {
    grid-template-columns: 1fr;
  }
}

.notification-strip-card {
  margin-bottom: 20px;
}

.notification-strip-list {
  display: grid;
  gap: 10px;
}

.notification-strip-item,
.notification-center-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(135, 150, 176, 0.16);
  background: rgba(248, 250, 252, 0.94);
}

.notification-strip-item.warning,
.notification-center-item.warning {
  background: rgba(255, 251, 235, 0.92);
  border-color: rgba(245, 158, 11, 0.24);
}

.notification-strip-item.critical,
.notification-center-item.critical {
  background: rgba(254, 242, 242, 0.94);
  border-color: rgba(239, 68, 68, 0.2);
}

.notification-strip-marker {
  width: 10px;
  min-height: 100%;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.24);
}

.notification-strip-item.warning .notification-strip-marker,
.notification-center-item.warning .notification-strip-marker {
  background: rgba(245, 158, 11, 0.9);
}

.notification-strip-item.critical .notification-strip-marker,
.notification-center-item.critical .notification-strip-marker {
  background: rgba(239, 68, 68, 0.92);
}

.notification-strip-title,
.notification-center-title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.notification-strip-text,
.notification-center-text,
.notification-center-meta {
  color: var(--gray-500);
  line-height: 1.5;
}

.notification-center-list {
  display: grid;
  gap: 14px;
}

.notification-center-head,
.notification-center-actions,
.notification-center-badges,
.notification-summary-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-center-item {
  grid-template-columns: 1fr;
}

.notification-center-actions {
  margin-top: 10px;
}


.topbar-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(135, 150, 176, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}

.topbar-search-trigger .app-icon-svg {
  width: 16px;
  height: 16px;
}

.topbar-search-trigger kbd {
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.9);
  color: var(--gray-500);
  font-size: 0.72rem;
}

.global-search-overlay {
  backdrop-filter: blur(12px);
}

.global-search-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  margin: 8vh auto 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(216, 223, 235, 0.92);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.global-search-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(216, 223, 235, 0.88);
}

.global-search-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.global-search-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.global-search-subtitle {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 0.88rem;
}

.global-search-input-wrap {
  position: relative;
  margin-top: 16px;
}

.global-search-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0;
}

.global-search-input-icon .app-icon-svg {
  width: 18px;
  height: 18px;
}

.global-search-input {
  padding-left: 44px;
  min-height: 48px;
}

.global-search-body {
  padding: 14px 16px 18px;
  overflow: auto;
}

.global-search-empty {
  padding: 22px 14px;
  color: var(--gray-500);
}

.global-search-results {
  display: grid;
  gap: 10px;
}

.global-search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid rgba(216, 223, 235, 0.88);
  background: rgba(248, 250, 252, 0.92);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.global-search-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: var(--shadow);
}

.global-search-item-title {
  font-weight: 700;
  color: var(--gray-900);
}

.global-search-item-subtitle,
.global-search-item-note {
  color: var(--gray-500);
  font-size: 0.84rem;
  line-height: 1.45;
}

.global-search-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

@media (max-width: 900px) {
  .topbar-search-trigger span {
    display: none;
  }
}

@media (max-width: 760px) {
  .global-search-modal {
    width: calc(100vw - 20px);
    margin-top: 4vh;
  }

  .global-search-item {
    grid-template-columns: 1fr;
  }

  .global-search-item-meta {
    align-items: flex-start;
    text-align: left;
  }
}


.departments-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.sidebar.is-compact .sidebar-header {
  padding: 10px 12px 12px;
}

.sidebar.is-compact .brand-logo.sidebar {
  width: 154px;
}

.sidebar.is-compact .sidebar-nav {
  padding-top: 10px;
}

.sidebar.is-compact .nav-section-title {
  padding: 10px 14px 6px;
}

.sidebar.is-compact .nav-item {
  min-height: 48px;
  margin: 2px 4px;
  padding: 9px 12px;
  column-gap: 10px;
}

.sidebar.is-compact .sidebar-dashboard .nav-item::before {
  top: 9px;
  bottom: 9px;
}

.sidebar.is-compact .sidebar-dashboard .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.sidebar.is-compact .nav-item-label {
  font-size: 0.88rem;
}

.sidebar.is-compact .nav-item-hint {
  font-size: 0.71rem;
  margin-top: 1px;
}

.sidebar.is-compact .nav-badge,
.sidebar.is-compact .sidebar-shortcuts {
  display: none;
}

.sidebar.is-compact .sidebar-footer {
  padding: 10px;
}

.sidebar.is-condensed .nav-item-hint,
.sidebar.is-condensed .nav-badge,
.sidebar.is-condensed .sidebar-user-session,
.sidebar.is-condensed .sidebar-shortcuts {
  display: none;
}

.sidebar.is-condensed .nav-item {
  min-height: 42px;
  padding: 8px 12px;
}

.sidebar.is-condensed .nav-section-title {
  padding: 8px 14px 5px;
  font-size: 0.64rem;
}

.sidebar.is-condensed .sidebar-header {
  padding: 8px 10px 10px;
}

.sidebar.is-condensed .brand-logo.sidebar {
  width: 144px;
}

.sidebar.is-condensed .sidebar-dashboard .nav-icon {
  width: 28px;
  height: 28px;
}

.sidebar.is-condensed .nav-item-label {
  font-size: 0.84rem;
}

.sidebar.is-condensed .sidebar-footer {
  padding: 8px 10px 10px;
}

@media (max-height: 920px) {
  .sidebar {
    padding: 12px 10px;
  }

  .sidebar-header {
    padding: 10px 10px 12px;
  }

  .brand-logo.sidebar {
    width: 156px;
  }

  .sidebar-nav {
    padding-top: 8px;
  }

  .nav-section-title {
    padding: 9px 12px 6px;
    font-size: 0.64rem;
  }

  .nav-item {
    min-height: 46px;
    margin: 2px 4px;
    padding: 8px 12px;
    column-gap: 10px;
  }

  .sidebar-dashboard .nav-item::before {
    top: 8px;
    bottom: 8px;
  }

  .sidebar-dashboard .nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .nav-item-label {
    font-size: 0.86rem;
  }

  .nav-item-hint,
  .nav-badge,
  .sidebar-shortcuts {
    display: none;
  }

  .sidebar-footer {
    padding: 8px 10px 10px;
  }
}

@media (max-height: 780px) {
  .sidebar {
    padding: 10px 8px;
  }

  .sidebar-header {
    padding: 8px 8px 10px;
  }

  .brand-logo.sidebar {
    width: 146px;
  }

  .nav-section-title {
    padding: 8px 12px 5px;
    font-size: 0.61rem;
  }

  .nav-item {
    min-height: 42px;
    padding: 7px 11px;
  }

  .nav-badge {
    display: none;
  }

  .sidebar-dashboard .nav-icon {
    width: 28px;
    height: 28px;
  }

  .sidebar-user {
    padding: 10px;
    border-radius: 16px;
  }
}

.departments-overview-grid-wide {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.metric-card.compact {
  min-height: auto;
  padding: 18px 20px;
}

.departments-layout-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.departments-layout-grid-advanced {
  grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.35fr);
}

.departments-filter-card {
  margin-bottom: 18px;
}

.departments-view-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.departments-filter-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card-header.spaced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hierarchy-card {
  position: sticky;
  top: 96px;
}

.hierarchy-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hierarchy-node-metrics {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 600;
}

.hierarchy-node-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,252,0.95));
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  padding: 16px;
}

.hierarchy-node.level-0 > .hierarchy-node-card {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.08);
}

.hierarchy-node-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.hierarchy-node-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.hierarchy-node-code,
.dept-table-subtitle,
.hierarchy-node-meta,
.empty-state-inline {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.hierarchy-node-meta {
  margin-top: 6px;
}

.hierarchy-node-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hierarchy-children {
  margin-top: 12px;
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid rgba(15, 118, 110, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dept-table-title {
  font-weight: 700;
  color: var(--gray-900);
}

.table-actions-wrap {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--gray-700);
  font-weight: 600;
}

.modal-tall {
  max-height: 88vh;
}

.department-view-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.department-stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.department-stat-pill span {
  color: var(--gray-600);
  font-size: 0.86rem;
}

.department-stat-pill strong {
  color: var(--gray-900);
  font-size: 1rem;
}

.department-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.department-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.department-route-card {
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.95));
  padding: 18px;
}

.department-route-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.department-route-value {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--gray-900);
}

.department-route-caption {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--gray-600);
}

.department-route-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.department-children-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.department-child-card {
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.95));
  padding: 18px;
}

.department-child-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.department-child-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.departments-export-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.departments-bulk-toolbar {
  margin: 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.departments-bulk-meta {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 600;
}

.departments-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.departments-bulk-ops-board {
  margin-bottom: 18px;
}

.departments-bulk-ops-actions,
.departments-bulk-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.departments-problems-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.departments-bulk-transfer-preview {
  margin-top: 8px;
}

.departments-bulk-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.departments-problems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.departments-problem-card {
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.95));
  padding: 18px;
}

.departments-problem-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.departments-problem-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.departments-problem-item {
  border: 1px solid rgba(135, 150, 176, 0.18);
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
}

.departments-problems-detail {
  margin-top: 16px;
  border-top: 1px solid rgba(135, 150, 176, 0.16);
  padding-top: 16px;
}

.departments-problems-table .problem-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.departments-problems-table .mini-pill.is-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #9a6700;
}

.departments-problems-table .mini-pill.is-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #b42318;
}

.departments-matrix-board {
  margin-bottom: 18px;
}

.departments-matrix-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.departments-matrix-filters {
  display: grid;
  grid-template-columns: minmax(220px, 280px);
  gap: 12px;
}

.departments-matrix-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.departments-matrix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.department-matrix-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-matrix-health.is-good .mini-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.department-matrix-health.is-warn .mini-pill {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.department-matrix-health.is-alert .mini-pill {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.department-approval-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.department-approval-card {
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.95));
  padding: 18px;
}

.department-approval-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.department-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.department-recommendation-card {
  border: 1px solid rgba(135, 150, 176, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,252,0.95));
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.department-recommendation-card.is-critical {
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.08);
}

.department-recommendation-card.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.08);
}

.department-recommendation-card.is-good {
  border-color: rgba(16, 185, 129, 0.24);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.07);
}

.department-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.departments-control-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.departments-control-board {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.departments-control-tile {
  border: 1px solid rgba(135, 150, 176, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.95));
  padding: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.departments-control-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 16px 32px rgba(15, 118, 110, 0.08);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(247, 249, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.16);
}

.department-view-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(237, 248, 246, 0.98), rgba(250, 242, 238, 0.92));
  border: 1px solid rgba(135, 150, 176, 0.18);
}

.department-view-banner-title,
.modal-hint-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.department-view-banner-text,
.modal-hint-text {
  margin-top: 6px;
  color: var(--gray-700);
  font-weight: 600;
  line-height: 1.5;
}

.modal-hint-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(243, 247, 252, 0.96);
  border: 1px solid rgba(135, 150, 176, 0.18);
}

.modal-static-field {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(135, 150, 176, 0.2);
  background: rgba(246, 248, 252, 0.92);
  color: var(--gray-700);
  font-weight: 600;
}

.table-primary {
  font-weight: 700;
  color: var(--gray-900);
}

.detail-label {
  color: var(--gray-500);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.detail-value {
  color: var(--gray-900);
  font-weight: 700;
}

.form-group-span-2 {
  grid-column: 1 / -1;
}

.modal-wide {
  width: min(720px, calc(100vw - 32px));
}

#marketplace-request-overlay .modal-wide {
  width: min(1240px, calc(100vw - 32px));
  max-width: min(1240px, calc(100vw - 32px));
}

#marketplace-request-overlay .modal {
  width: min(1240px, calc(100vw - 32px));
  max-width: min(1240px, calc(100vw - 32px));
}

#department-view-overlay .modal-wide {
  width: min(1180px, calc(100vw - 32px));
  max-width: min(1180px, calc(100vw - 32px));
}

#department-view-overlay .modal {
  width: min(1180px, calc(100vw - 32px));
  max-width: min(1180px, calc(100vw - 32px));
}

@media (max-width: 1180px) {
  .departments-layout-grid {
    grid-template-columns: 1fr;
  }

  .hierarchy-card {
    position: static;
  }

  .departments-overview-grid-wide,
  .departments-control-board,
  .departments-problems-grid,
  .departments-bulk-ops-grid,
  .department-view-stats,
  .departments-filter-grid,
  .department-route-grid,
  .department-approval-grid,
  .department-children-grid,
  .department-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .department-view-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .departments-overview-grid,
  .form-grid-two {
    grid-template-columns: 1fr;
  }

  .departments-overview-grid-wide,
  .departments-control-board,
  .departments-problems-grid,
  .departments-bulk-ops-grid,
  .department-view-stats,
  .departments-filter-grid,
  .department-route-grid,
  .department-approval-grid,
  .department-children-grid,
  .department-view-grid,
  .detail-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .departments-export-actions {
    justify-content: stretch;
  }

  .departments-view-modes {
    flex-direction: column;
  }

  .departments-matrix-toolbar,
  .departments-matrix-actions {
    align-items: stretch;
  }

  .departments-bulk-toolbar {
    align-items: stretch;
  }

  .form-group-span-2 {
    grid-column: auto;
  }

  .card-header.spaced {
    flex-direction: column;
    align-items: stretch;
  }
}


.topbar-help-trigger,
.login-help-trigger {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(135, 150, 176, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(15, 23, 39, 0.08);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.topbar-help-trigger:hover,
.login-help-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 39, 0.12);
  border-color: rgba(15, 118, 110, 0.34);
}

.topbar-help-trigger .app-icon-svg,
.login-help-trigger .app-icon-svg {
  width: 20px;
  height: 20px;
}

.login-help-trigger {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
}

.help-center-modal {
  width: min(1120px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.help-center-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #13233d 100%);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
}

.help-center-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 4px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.help-center-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-center-brand-icon .app-icon-svg {
  width: 20px;
  height: 20px;
}

.help-center-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.help-center-subtitle {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.82rem;
  margin-top: 2px;
}

.help-center-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  min-height: 0;
  scrollbar-gutter: stable;
}

.help-center-search-shell {
  display: grid;
  gap: 8px;
}

.help-center-search {
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.help-center-search::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

.help-center-search-meta {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.72);
  padding-left: 4px;
}

.help-center-nav-group {
  display: grid;
  gap: 8px;
}

.help-center-nav-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.78);
  padding: 6px 6px 0;
}

.help-center-nav-group-items {
  display: grid;
  gap: 6px;
}

.help-center-nav-item {
  text-align: left;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.86);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.help-center-nav-item-title {
  font-weight: 700;
}

.help-center-nav-item-caption {
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.64);
}

.help-center-nav-item.active,
.help-center-nav-item:hover {
  background: rgba(15, 118, 110, 0.26);
  color: #fff;
}

.help-center-content-shell {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.help-center-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.help-center-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.help-admin-action {
  white-space: nowrap;
}

.help-center-content-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
}

.help-center-content-subtitle {
  color: var(--gray-500);
  margin-top: 4px;
}

.help-center-content {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-center-nav::-webkit-scrollbar,
.help-center-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.help-center-nav::-webkit-scrollbar-track,
.help-center-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.help-center-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.help-center-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

@media (max-height: 920px) {
  .help-center-modal {
    height: min(720px, calc(100vh - 24px));
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .help-center-sidebar {
    padding: 18px 14px;
    gap: 14px;
  }

  .help-center-brand {
    padding: 4px 2px 10px;
  }

  .help-center-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .help-center-title {
    font-size: 0.98rem;
  }

  .help-center-subtitle {
    font-size: 0.76rem;
  }

  .help-center-nav {
    gap: 6px;
  }

  .help-center-nav-item {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .help-center-content-shell {
    padding: 20px 22px;
  }

  .help-center-header {
    margin-bottom: 14px;
  }

  .help-center-content-title {
    font-size: 1.2rem;
  }

  .help-center-content-subtitle {
    font-size: 0.86rem;
  }
}

@media (max-height: 780px) {
  .help-center-modal {
    height: min(680px, calc(100vh - 18px));
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .help-center-sidebar {
    padding: 14px 12px;
    gap: 12px;
  }

  .help-center-brand {
    gap: 10px;
    padding-bottom: 8px;
  }

  .help-center-brand-icon {
    width: 34px;
    height: 34px;
  }

  .help-center-title {
    font-size: 0.92rem;
  }

  .help-center-subtitle {
    font-size: 0.72rem;
  }

  .help-center-nav-item {
    padding: 9px 11px;
    font-size: 0.88rem;
  }

  .help-center-content-shell {
    padding: 16px 18px;
  }

  .help-center-header-actions .help-admin-action {
    min-height: 36px;
    padding: 0 12px;
  }

  .help-center-content-title {
    font-size: 1.08rem;
  }
}

.help-section-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,252,0.96));
  border: 1px solid rgba(135, 150, 176, 0.22);
  border-radius: 20px;
  padding: 20px;
}

.help-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-section-intro {
  font-size: 0.96rem;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.help-section-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-point {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  color: var(--gray-700);
}

.help-point-marker {
  color: var(--primary);
  font-weight: 800;
}

.help-section-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(194, 65, 12, 0.08));
  color: var(--gray-600);
}

.help-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.help-screenshot-card {
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,252,0.96));
  border: 1px solid rgba(135, 150, 176, 0.22);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(15, 23, 39, 0.08);
}

.help-screenshot-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f3f5f8;
}

.help-screenshot-caption {
  padding: 12px 14px 14px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.help-editor-preview {
  margin-top: 10px;
  min-height: 120px;
  border: 1px dashed rgba(135, 150, 176, 0.4);
  border-radius: 16px;
  background: rgba(247, 249, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.help-editor-preview-empty {
  color: var(--gray-500);
  font-size: 0.92rem;
  padding: 18px;
  text-align: center;
}

.help-editor-preview-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .help-center-modal {
    grid-template-columns: 1fr;
    height: min(92vh, 900px);
  }

  .help-center-sidebar {
    padding-bottom: 12px;
  }

  .help-center-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: auto hidden;
  }

  .help-center-nav-item {
    white-space: nowrap;
  }
}

.workflow-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow-command-card {
  min-height: 100%;
}

.workflow-actionable-list,
.workflow-template-list,
.workflow-create-summary {
  display: grid;
  gap: 12px;
}

.workflow-actionable-item {
  border: 1px solid rgba(33, 67, 110, 0.12);
  background: rgba(245, 249, 255, 0.8);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.workflow-actionable-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(14, 31, 56, 0.08);
  border-color: rgba(26, 133, 120, 0.22);
}

.workflow-actionable-main,
.workflow-actionable-meta {
  display: grid;
  gap: 4px;
}

.workflow-actionable-main span,
.workflow-actionable-meta span,
.workflow-health-note,
.workflow-inline-empty,
.workflow-summary-item span,
.workflow-volume-progress-label {
  color: var(--gray-500);
  font-size: 0.92rem;
}

.workflow-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workflow-health-item,
.workflow-summary-item {
  border: 1px solid rgba(33, 67, 110, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.workflow-health-item strong,
.workflow-summary-item strong {
  font-size: 1.05rem;
  color: var(--navy-900);
}

.workflow-template-button {
  justify-content: flex-start;
}

.workflow-filter-switches {
  margin-top: 12px;
}

.workflow-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.workflow-toggle input {
  width: 18px;
  height: 18px;
}

.workflow-volume-progress {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.workflow-volume-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(33, 67, 110, 0.08);
  overflow: hidden;
}

.workflow-volume-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a8578 0%, #5fbfa8 100%);
}

.workflow-scope-tab[data-count]::after {
  content: attr(data-count);
  margin-left: 8px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(18, 44, 84, 0.08);
  color: var(--navy-900);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.workflow-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(340px, 1.05fr);
  gap: 20px;
  margin-bottom: 20px;
}

#marketplace-request-overlay .workflow-create-layout {
  grid-template-columns: minmax(0, 1.95fr) minmax(380px, 0.95fr);
  gap: 24px;
}

.workflow-create-summary-card {
  align-self: start;
}

.workflow-progress-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.workflow-progress-step {
  border: 1px solid rgba(33, 67, 110, 0.12);
  border-radius: 20px;
  padding: 14px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  background: rgba(255, 255, 255, 0.76);
}

.workflow-progress-step.is-done {
  border-color: rgba(26, 133, 120, 0.2);
  background: rgba(232, 248, 242, 0.9);
}

.workflow-progress-step.is-current {
  box-shadow: 0 18px 36px rgba(14, 31, 56, 0.1);
  transform: translateY(-1px);
}

.workflow-progress-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 44, 84, 0.08);
  color: var(--navy-900);
  font-weight: 700;
}

.workflow-progress-step.is-done .workflow-progress-dot {
  background: linear-gradient(135deg, #1a8578 0%, #5fbfa8 100%);
  color: #fff;
}

.workflow-progress-copy {
  display: grid;
  gap: 4px;
}

.workflow-progress-copy span {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.workflow-issue-row {
  border: 1px solid rgba(33, 67, 110, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px 18px;
}

.workflow-issue-row + .workflow-issue-row {
  margin-top: 12px;
}

.workflow-detail-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.workflow-stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workflow-stamp-card {
  position: relative;
  overflow: hidden;
  border: 1px dashed rgba(33, 67, 110, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(26, 133, 120, 0.08), transparent 38%),
    rgba(248, 250, 255, 0.86);
  padding: 18px;
  min-height: 190px;
}

.workflow-stamp-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(33, 67, 110, 0.08);
  border-radius: 18px;
  pointer-events: none;
}

.workflow-stamp-card.is-signed {
  border-color: rgba(26, 133, 120, 0.32);
  background:
    radial-gradient(circle at top right, rgba(26, 133, 120, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(237, 250, 247, 0.96), rgba(245, 251, 249, 0.92));
}

.workflow-stamp-card.is-pending {
  border-color: rgba(217, 119, 6, 0.26);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 42%),
    rgba(255, 251, 243, 0.94);
}

.workflow-stamp-card.is-empty {
  background: rgba(250, 252, 255, 0.76);
}

.workflow-stamp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.workflow-stamp-role {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 800;
}

.workflow-stamp-title {
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gray-900);
}

.workflow-stamp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.workflow-stamp-badge.is-signed {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
}

.workflow-stamp-badge.is-pending {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.workflow-stamp-badge.is-empty {
  background: rgba(148, 163, 184, 0.14);
  color: var(--gray-600);
}

.workflow-stamp-meta {
  display: grid;
  gap: 10px;
}

.workflow-stamp-row {
  display: grid;
  gap: 2px;
}

.workflow-stamp-label {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 800;
}

.workflow-stamp-value {
  color: var(--gray-800);
  font-weight: 700;
}

.workflow-stamp-footnote {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(33, 67, 110, 0.16);
  color: var(--gray-500);
  font-size: 0.84rem;
}

.workflow-comment-thread,
.workflow-attachment-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.workflow-comment-card,
.workflow-attachment-card {
  border: 1px solid rgba(33, 67, 110, 0.12);
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.84);
  padding: 14px 16px;
}

.workflow-comment-head,
.workflow-attachment-head,
.workflow-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-comment-author,
.workflow-attachment-name {
  font-weight: 700;
  color: var(--gray-900);
}

.workflow-comment-time,
.workflow-attachment-meta {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.workflow-comment-text {
  margin-top: 10px;
  color: var(--gray-700);
  line-height: 1.5;
  white-space: pre-wrap;
}

.workflow-inline-form {
  display: grid;
  gap: 12px;
}

.workflow-issue-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: end;
}

.workflow-issue-name {
  font-weight: 700;
  color: var(--navy-900);
}

.workflow-issue-meta {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--gray-500);
}

.workflow-issue-qty {
  display: grid;
  gap: 8px;
}

@media (max-width: 1180px) {
  .workflow-command-grid,
  .workflow-progress-strip {
    grid-template-columns: 1fr;
  }

  .workflow-create-layout {
    grid-template-columns: 1fr;
  }

  .workflow-detail-support-grid {
    grid-template-columns: 1fr;
  }

  .workflow-stamp-grid {
    grid-template-columns: 1fr;
  }

  .workflow-issue-line {
    grid-template-columns: 1fr;
  }
}

/* Hard fix for sidebar logo shell on prod pages */
.sidebar-header {
  overflow: hidden;
}

.sidebar-header .brand-lockup.sidebar-brand-mark {
  box-sizing: border-box;
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.sidebar-header .brand-lockup.sidebar-brand-mark .brand-logo.sidebar {
  display: block;
  width: min(170px, 100%);
  max-width: 100%;
  margin: 0 auto;
}

.sidebar-brand-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #dff7ef;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

/* BPMN canvas polish */
.bpmn-visual-preview-canvas {
  min-height: 980px;
}

.bpmn-canvas-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bpmn-canvas-toolbar .btn {
  min-width: 44px;
}

.bpmn-canvas-hint {
  margin-top: 16px;
  margin-bottom: 16px;
}

.bpmn-canvas-viewport {
  position: relative;
  overflow: auto;
  min-height: 780px;
  max-height: 78vh;
  border: 1px solid rgba(33, 67, 110, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 1px 1px, rgba(110, 128, 150, 0.14) 1.1px, transparent 0) 0 0 / 20px 20px,
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(244, 248, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bpmn-canvas-viewport.is-panning {
  cursor: grabbing;
}

.bpmn-canvas-viewport::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.bpmn-canvas-viewport::-webkit-scrollbar-thumb {
  background: rgba(113, 131, 156, 0.45);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.bpmn-canvas-viewport::-webkit-scrollbar-track {
  background: rgba(234, 240, 248, 0.72);
  border-radius: 999px;
}

.bpmn-canvas-stage-wrap {
  position: relative;
}

.bpmn-canvas-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}

.bpmn-canvas-svg {
  overflow: visible;
}

.bpmn-canvas-connector {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bpmn-canvas-connector-next {
  stroke: #8291a8;
}

.bpmn-canvas-connector-yes {
  stroke: #22a06b;
}

.bpmn-canvas-connector-no {
  stroke: #d97706;
}

.bpmn-canvas-connector-label {
  font-size: 13px;
  font-weight: 800;
  fill: #5b6a80;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 4px;
}

.bpmn-canvas-guide {
  stroke: rgba(15, 96, 182, 0.24);
  stroke-width: 2;
  stroke-dasharray: 8 6;
}

.bpmn-canvas-node {
  user-select: none;
  touch-action: none;
  cursor: grab;
  box-shadow: 0 18px 40px rgba(26, 46, 78, 0.12);
}

.bpmn-canvas-node:active {
  cursor: grabbing;
}

.bpmn-canvas-node.is-selected {
  box-shadow: 0 0 0 3px rgba(15, 96, 182, 0.24), 0 20px 44px rgba(26, 46, 78, 0.16);
}

.bpmn-canvas-node.is-connecting-source {
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.24), 0 20px 44px rgba(26, 46, 78, 0.16);
}

.bpmn-canvas-node-start,
.bpmn-canvas-node-end {
  border-radius: 999px;
}

.bpmn-canvas-node-gateway {
  border-radius: 36px;
}

.bpmn-canvas-node-title {
  font-size: 1rem;
  line-height: 1.35;
}

.bpmn-canvas-node-role {
  line-height: 1.35;
  max-width: 100%;
}

.bpmn-canvas-node-actions {
  margin-top: 12px;
}

.bpmn-port {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(15, 96, 182, 0.34);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(26, 46, 78, 0.12);
  opacity: 0.92;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.bpmn-port-in {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.86);
  pointer-events: none;
  width: 10px;
  height: 10px;
}

.bpmn-port-out {
  z-index: 2;
}

.bpmn-port:hover {
  transform: scale(1.12);
  border-color: rgba(15, 96, 182, 0.7);
  background: #ecf6ff;
}

.bpmn-port.is-active {
  transform: scale(1.14);
  border-color: rgba(21, 128, 61, 0.82);
  background: rgba(237, 250, 247, 0.98);
  box-shadow: 0 0 0 5px rgba(34, 160, 107, 0.14);
}

.bpmn-port-top {
  top: -7px;
  left: calc(50% - 7px);
}

.bpmn-port-right {
  right: -7px;
  top: calc(50% - 7px);
}

.bpmn-port-bottom {
  bottom: -7px;
  left: calc(50% - 7px);
}

.bpmn-port-left {
  left: -7px;
  top: calc(50% - 7px);
}

.modal-bpmn-editor {
  width: min(1480px, calc(100vw - 28px));
  max-width: min(1480px, calc(100vw - 28px));
}

@media (max-width: 1180px) {
  .bpmn-canvas-viewport {
    min-height: 620px;
    max-height: 70vh;
  }
}
