:root {
  color-scheme: light;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --sky-50: #f0f9ff;
  --sky-600: #0284c7;
  --purple-50: #faf5ff;
  --purple-600: #9333ea;
  --line: #e2e8f0;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-hero: 40px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-emerald: 0 16px 32px rgba(5, 150, 105, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--slate-50);
  color: var(--slate-900);
  font-family: var(--app-font, Inter), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--app-font-size, 16px);
  -webkit-font-smoothing: antialiased;
}

body.theme-night {
  color-scheme: dark;
  --slate-50: #07111f;
  --slate-100: #0b1626;
  --slate-200: #1f2d44;
  --slate-300: #33445f;
  --slate-400: #7f8fa8;
  --slate-500: #9aa8bc;
  --slate-600: #c0c9d8;
  --slate-700: #d8e0ec;
  --slate-800: #e8eef7;
  --slate-900: #f8fafc;
  --emerald-50: #062017;
  --emerald-100: #0b3a29;
  --line: #1f2d44;
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  background: #07111f;
}

body::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.modal::-webkit-scrollbar {
  width: 6px;
}

body::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 999px;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--slate-100);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-emerald);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

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

.brand strong {
  line-height: 1;
  font-size: 1.15rem;
  font-weight: 900;
}

.brand span {
  margin-top: 4px;
  color: var(--slate-400);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: grid;
  gap: 12px;
  align-content: start;
}

.nav-group {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 20px;
}

.nav-group:hover {
  border-color: rgba(226, 232, 240, 0.8);
  background: rgba(248, 250, 252, 0.72);
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 6px 5px;
  color: var(--slate-400);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-section i {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--slate-100);
  color: var(--emerald-700);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.nav-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-item i {
  width: 18px;
  color: var(--slate-400);
  font-size: 1rem;
}

.nav-item:hover {
  background: #fff;
  color: var(--slate-900);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.nav-item.active {
  background: var(--emerald-600);
  color: #fff;
  box-shadow: var(--shadow-emerald);
}

.nav-item.active i {
  color: #fff;
}

.nav-item.module-locked {
  display: none !important;
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: var(--slate-50);
}

.sidebar-card strong {
  display: block;
  margin-top: 4px;
}

.sidebar-card p {
  margin: 8px 0 0;
  color: var(--slate-500);
  font-size: 0.8rem;
  line-height: 1.55;
}

.sidebar-profile-card {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.sidebar-profile-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.sidebar-profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}

.sidebar-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile-head strong,
.sidebar-profile-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-head strong {
  margin: 0;
  font-size: 0.9rem;
}

.sidebar-profile-head small {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-profile-actions button {
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
  color: var(--slate-700);
  min-height: 38px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.sidebar-profile-actions button:hover {
  border-color: var(--emerald-200);
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  padding: 0 40px 40px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -40px 28px;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  margin: 0 0 4px;
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--slate-800);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

.page-header-writeup {
  max-width: 720px;
  margin: 4px 0 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-toggle-button {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: #fff;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 900;
}

.theme-toggle-button:hover {
  border-color: var(--emerald-200);
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.search-box {
  position: relative;
}

.global-search-menu {
  position: fixed;
  top: var(--search-menu-top, 76px);
  left: var(--search-menu-left, 24px);
  z-index: 200;
  width: var(--search-menu-width, min(520px, 88vw));
  max-height: 460px;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.empty-search-result {
  padding: 18px;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 800;
}

.readonly-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--amber-100);
  border-radius: 16px;
  background: var(--amber-50);
  color: var(--amber-600);
  font-size: 0.78rem;
  font-weight: 900;
}

.readonly-control {
  opacity: 0.76;
}

.readonly-control input,
.readonly-control select,
.readonly-control textarea {
  cursor: not-allowed;
}

.top-icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--slate-600);
  font-size: 1.05rem;
}

.top-icon-button:hover {
  border-color: var(--slate-200);
  background: #fff;
  color: var(--emerald-700);
}

.top-icon-button span {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--rose-600);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
}

.top-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 76px;
  z-index: 55;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

#topMessagesMenu {
  right: 26px;
}

.top-dropdown-head {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.top-dropdown-head strong {
  color: var(--slate-900);
  font-size: 0.9rem;
  font-weight: 900;
}

.top-dropdown-head button {
  border: 0;
  background: transparent;
  color: var(--emerald-700);
  font-size: 0.68rem;
  font-weight: 900;
}

.top-dropdown-list {
  max-height: 390px;
  padding: 8px;
  display: grid;
  gap: 6px;
  overflow: auto;
}

.top-dropdown-item {
  width: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 0;
  border-radius: 16px;
  background: transparent;
  text-align: left;
}

.top-dropdown-item:hover {
  background: var(--emerald-50);
}

.top-dropdown-item > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--sky-50);
  color: var(--sky-600);
}

.top-dropdown-item > i.warn {
  background: var(--amber-50);
  color: var(--amber-600);
}

.top-dropdown-item > i.danger {
  background: var(--rose-50);
  color: var(--rose-600);
}

.top-dropdown-item span,
.top-dropdown-item strong,
.top-dropdown-item small,
.top-dropdown-item em {
  display: block;
  min-width: 0;
}

.top-dropdown-item strong {
  overflow: hidden;
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-dropdown-item small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 800;
}

.top-dropdown-item em {
  margin-top: 4px;
  color: var(--slate-400);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
}

.top-dropdown-empty {
  padding: 24px;
  color: var(--slate-400);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.hidden {
  display: none !important;
}

.top-profile {
  position: relative;
}

.top-profile-btn {
  min-height: 44px;
  padding: 5px 8px 5px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: #fff;
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.top-profile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.top-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-profile-text {
  min-width: 0;
  display: grid;
  text-align: left;
}

.top-profile-text strong {
  max-width: 150px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-profile-text small {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.top-profile-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
}

.top-profile-menu button:hover {
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.search-box input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--slate-50);
  color: var(--slate-900);
  outline: none;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.search-box input {
  width: min(360px, 42vw);
  padding: 0 16px;
  background: #fff;
}

.search-box input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--emerald-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.primary-button,
.ghost-button,
.small-button,
.light-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 900;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.primary-button {
  padding: 0 18px;
  background: var(--slate-900);
  color: #fff;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
}

.primary-button:hover {
  background: #020617;
}

.primary-button.compact,
.small-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.74rem;
}

.ghost-button,
.small-button,
.icon-button {
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  background: var(--slate-100);
  color: var(--slate-700);
}

.ghost-button:hover,
.small-button:hover,
.icon-button:hover {
  background: var(--slate-200);
}

.icon-button {
  width: 38px;
  padding: 0;
}

.light-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.14);
  color: #fff;
}

.light-button:hover {
  background: rgba(16, 185, 129, 0.24);
}

.user-strip {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: #fff;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.alert-host {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.alert {
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--slate-900);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.alert.error {
  background: var(--rose-600);
}

.login-gate {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
  padding: 36px 0;
  background: linear-gradient(135deg, var(--emerald-50), #fff, rgba(236, 253, 245, 0.58));
  border-radius: 36px;
  position: relative;
  overflow: hidden;
}

.login-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(5, 150, 105, 0.08), transparent 45%),
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.14), transparent 26%);
}

.login-gate-card {
  position: relative;
  width: min(480px, 100%);
  padding: 36px;
  border: 1px solid var(--slate-200);
  border-radius: 32px;
  background: #fff;
  text-align: center;
  box-shadow: 0 22px 48px rgba(148, 163, 184, 0.28);
}

.login-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 2.35rem;
  box-shadow: var(--shadow-emerald);
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.login-gate-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1.85rem;
  font-weight: 900;
}

.login-welcome {
  max-width: 360px;
  margin: 14px auto 0;
  color: var(--slate-600);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

.login-trust-row {
  margin: 18px 0 4px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-trust-row span {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--emerald-100);
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.72rem;
  font-weight: 900;
}

.login-gate-card > span {
  display: block;
  margin-top: 5px;
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
  text-align: left;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--slate-700);
  font-size: 0.84rem;
  font-weight: 800;
}

.input-icon {
  position: relative;
}

.input-icon > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}

.input-icon input,
.input-icon select {
  width: 100%;
  min-height: 48px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  outline: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.input-icon input:focus,
.input-icon select:focus {
  border-color: var(--emerald-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--slate-400);
}

.remember-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  color: var(--slate-500) !important;
  font-size: 0.84rem !important;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald-600);
}

.login-submit {
  width: 100%;
  min-height: 50px;
  background: var(--emerald-600);
  box-shadow: var(--shadow-emerald);
}

.login-submit:hover {
  background: var(--emerald-700);
}

.login-gate-card small {
  display: block;
  margin-top: 22px;
  color: var(--slate-400);
  font-size: 0.8rem;
  font-weight: 700;
}

body.theme-night .app-shell {
  background: #07111f;
}

body.theme-night .sidebar,
body.theme-night .topbar,
body.theme-night .login-gate-card,
body.theme-night .panel,
body.theme-night .metric-card,
body.theme-night .risk-panel,
body.theme-night .work-card,
body.theme-night .module-card,
body.theme-night .settings-card,
body.theme-night .profile-panel,
body.theme-night .profile-card,
body.theme-night .role-card,
body.theme-night .department-card,
body.theme-night .modal,
body.theme-night .top-dropdown,
body.theme-night .global-search-menu,
body.theme-night .floating-helpdesk-panel,
body.theme-night .checkout-panel,
body.theme-night .cart-panel,
body.theme-night .table-wrap,
body.theme-night .sidebar-card {
  border-color: #20324d;
  background: #0b1626;
  color: var(--slate-800);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

body.theme-night .login-gate {
  background: linear-gradient(135deg, #06121f, #0b1626 54%, #062017);
}

body.theme-night .hero-panel,
body.theme-night .dashboard-hero-grid > *,
body.theme-night .dashboard-lower-grid > *,
body.theme-night .admin-mini-grid span,
body.theme-night .access-risk-card,
body.theme-night .feature-toggle,
body.theme-night .stock-card,
body.theme-night .product-card,
body.theme-night .customer-card,
body.theme-night .supplier-card,
body.theme-night .document-card,
body.theme-night .queue-card,
body.theme-night .timeline-item,
body.theme-night .empty-state {
  border-color: #20324d;
  background: #0f1c2e;
  color: var(--slate-800);
}

body.theme-night input,
body.theme-night select,
body.theme-night textarea,
body.theme-night .search-box input,
body.theme-night .input-icon,
body.theme-night .ghost-button,
body.theme-night .light-button,
body.theme-night .small-button,
body.theme-night .theme-toggle-button,
body.theme-night .top-profile-btn,
body.theme-night .sidebar-profile-actions button {
  border-color: #243650;
  background: #0f1c2e;
  color: var(--slate-800);
}

body.theme-night input::placeholder,
body.theme-night textarea::placeholder {
  color: #7f8fa8;
}

body.theme-night table,
body.theme-night tbody,
body.theme-night tr,
body.theme-night td,
body.theme-night th {
  border-color: #20324d;
}

body.theme-night th {
  color: var(--slate-600);
  background: #0f1c2e;
}

body.theme-night td,
body.theme-night p,
body.theme-night .muted,
body.theme-night small {
  color: var(--slate-500);
}

body.theme-night h1,
body.theme-night h2,
body.theme-night h3,
body.theme-night strong,
body.theme-night .panel-header h3,
body.theme-night .login-gate-card h2 {
  color: var(--slate-900);
}

body.theme-night .top-dropdown-item:hover,
body.theme-night .nav-item:hover,
body.theme-night .small-button:hover,
body.theme-night .light-button:hover,
body.theme-night .theme-toggle-button:hover {
  background: #102b25;
  border-color: #145c43;
}

body.theme-night .brand-mark,
body.theme-night .login-logo,
body.theme-night .top-profile-avatar,
body.theme-night .sidebar-profile-avatar {
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.16);
}

body.is-authenticated .login-gate {
  display: none;
}

body.is-booting .sidebar,
body.is-booting .topbar,
body.is-booting .user-strip,
body.is-booting .alert-host,
body.is-booting .login-gate,
body.is-booting .view,
body.is-booting .app-footer,
body.is-booting .floating-helpdesk {
  display: none !important;
}

body.is-booting .workspace {
  min-height: 100vh;
}

body:not(.is-authenticated) .sidebar .nav,
body:not(.is-authenticated) .sidebar,
body:not(.is-authenticated) .sidebar-card,
body:not(.is-authenticated) .search-box,
body:not(.is-authenticated) .topbar,
body:not(.is-authenticated) .user-strip,
body:not(.is-authenticated) #refreshBtn,
body:not(.is-authenticated) .hero-panel,
body:not(.is-authenticated) .view {
  display: none !important;
}

body:not(.is-authenticated) .app-shell {
  display: block;
  min-height: 100vh;
}

body:not(.is-authenticated) .workspace {
  min-height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body:not(.is-authenticated) .login-gate {
  min-height: calc(100vh - 74px);
  padding: 24px;
  border-radius: 0;
}

body:not(.is-authenticated) .alert-host {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 80;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-panel {
  margin-bottom: 32px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(260px, 0.7fr);
  align-items: center;
  gap: 24px;
  border: 1px solid var(--slate-800);
  border-radius: var(--radius-hero);
  background: linear-gradient(135deg, var(--slate-900), #020617 52%, #022c22);
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.hero-kicker {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.16);
}

.hero-panel h2 {
  max-width: 780px;
  margin: 12px 0 8px;
  font-size: clamp(1.28rem, 2.2vw, 1.9rem);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-panel p {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.82rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
}

.hero-stats div {
  min-width: max-content;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
}

.hero-stats strong,
.hero-stats span,
.metric-card strong,
.metric-card span {
  display: block;
}

.hero-stats strong {
  color: #fff;
  display: inline;
  margin-right: 5px;
  font-size: clamp(0.82rem, 1.25vw, 1rem);
  font-weight: 900;
  white-space: nowrap;
}

.hero-stats span {
  display: inline;
  margin-top: 0;
  color: var(--slate-400);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-actions .light-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
  margin-bottom: 44px;
}

.dashboard-only {
  display: none;
}

.dashboard-only.active {
  display: block;
}

.hero-panel.dashboard-only.active {
  display: grid;
}

.billing-workspace {
  display: grid;
  gap: 24px;
}

.billing-head,
.billing-status-grid,
.billing-lower-grid {
  display: grid;
  gap: 24px;
}

.billing-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.billing-head h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.billing-head p,
.billing-plan-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.billing-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.billing-status-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.billing-current-card,
.billing-plan-card {
  border: 1px solid var(--slate-200);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.billing-current-card {
  min-height: 220px;
  padding: 24px;
  display: grid;
  align-content: space-between;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

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

.billing-renewal div,
.billing-key-row,
.billing-usage-row,
.billing-module-pill {
  border: 1px solid var(--slate-100);
  background: rgba(248, 250, 252, 0.82);
}

.billing-renewal div {
  padding: 14px;
  border-radius: 18px;
}

.billing-renewal span,
.billing-key-row span,
.billing-usage-row span,
.billing-module-pill span {
  display: block;
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-renewal strong,
.billing-key-row strong,
.billing-module-pill strong {
  display: block;
  margin-top: 5px;
  color: var(--slate-900);
  font-size: 0.92rem;
  font-weight: 900;
}

.billing-gateway-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.billing-gateway-status {
  display: grid;
  gap: 10px;
}

.billing-gateway-status > div:first-child {
  min-height: 62px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
}

.billing-gateway-status .ready {
  border: 1px solid var(--emerald-100);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.billing-gateway-status .warning {
  border: 1px solid var(--amber-100);
  background: var(--amber-50);
  color: var(--amber-600);
}

.billing-gateway-status i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #fff;
  font-size: 1.2rem;
}

.billing-gateway-status strong,
.billing-gateway-status span {
  display: block;
}

.billing-gateway-status span {
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.billing-key-row {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 16px;
}

.billing-plan-toggle {
  width: fit-content;
  margin: 0 auto;
  padding: 6px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-100);
}

.billing-plan-toggle button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 900;
}

.billing-plan-toggle button.active {
  background: #fff;
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.billing-plan-toggle span {
  color: var(--emerald-600);
  font-size: 0.68rem;
}

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

.billing-plan-card {
  min-height: 390px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 30px;
}

.billing-plan-card.selected {
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-emerald);
}

.billing-plan-top {
  min-height: 104px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.billing-plan-top h3 {
  margin: 6px 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.billing-price strong {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.billing-price span {
  color: var(--slate-400);
  font-weight: 900;
}

.billing-limit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-limit-row span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 900;
}

.billing-plan-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.billing-plan-card li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-600);
  font-size: 0.86rem;
  font-weight: 700;
}

.billing-plan-card li i {
  color: var(--emerald-600);
}

.billing-plan-card button {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.billing-lower-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.billing-usage-grid,
.billing-module-grid {
  display: grid;
  gap: 12px;
}

.billing-usage-row {
  padding: 14px;
  display: grid;
  gap: 10px;
  border-radius: 18px;
}

.billing-usage-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.billing-module-pill {
  padding: 13px;
  border-radius: 16px;
}

.billing-module-pill strong {
  color: var(--emerald-700);
}

.billing-module-pill.locked strong {
  color: var(--rose-600);
}

.budget-workspace {
  display: grid;
  gap: 24px;
}

.budget-head,
.budget-head-actions,
.budget-line-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.budget-head {
  align-items: flex-end;
  justify-content: space-between;
}

.budget-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.budget-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.budget-head p {
  max-width: 840px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.budget-kpi-grid,
.budget-top-grid,
.budget-lower-grid,
.budget-risk-radar,
.budget-category-grid {
  display: grid;
  gap: 16px;
}

.budget-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.budget-top-grid,
.budget-lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.budget-filterbar,
.budget-check-grid {
  display: grid;
  gap: 12px;
  align-items: center;
}

.budget-filterbar {
  margin-bottom: 18px;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, 220px));
}

.budget-check-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) auto;
}

.budget-filterbar select,
.budget-check-grid select,
.budget-check-grid input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.budget-check-grid label {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.budget-risk-card,
.budget-category-card,
.budget-check-card,
.budget-line-editor {
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.budget-risk-card {
  display: grid;
  gap: 9px;
  border-left: 4px solid var(--emerald-500);
}

.budget-risk-card.warn {
  border-left-color: var(--amber-500);
}

.budget-risk-card.danger {
  border-left-color: var(--rose-500);
}

.budget-risk-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.budget-risk-card strong,
.budget-category-card strong,
.budget-check-card strong {
  font-weight: 900;
}

.budget-risk-card span,
.budget-category-card span,
.budget-check-card span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.budget-risk-card p,
.budget-category-card p,
.budget-check-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 700;
}

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

.budget-category-card {
  display: grid;
  gap: 9px;
}

.budget-check-result:empty {
  display: none;
}

.budget-check-card {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.budget-check-card.ok strong,
.ok-text {
  color: var(--emerald-600);
}

.budget-check-card.danger strong {
  color: var(--rose-600);
}

.budget-line-editor {
  display: grid;
  gap: 12px;
}

.budget-line-head {
  justify-content: space-between;
}

.budget-line-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.45fr) minmax(120px, 0.45fr) 42px;
  gap: 10px;
  align-items: end;
}

.budget-line-row label {
  margin: 0;
}

.request-workspace {
  display: grid;
  gap: 24px;
}

.request-head,
.request-head-actions,
.request-modal-lines-head,
.request-comments-head,
.request-comment-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-head {
  align-items: flex-end;
  justify-content: space-between;
}

.request-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.request-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.request-head p {
  max-width: 880px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.request-kpi-grid,
.request-grid,
.request-filterbar,
.request-detail-stats,
.request-stage-track {
  display: grid;
  gap: 16px;
}

.request-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.request-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
  align-items: start;
}

.request-side {
  display: grid;
  gap: 18px;
}

.request-filterbar {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 190px));
  align-items: center;
  margin-bottom: 18px;
}

.request-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.request-title-cell {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.request-title-cell strong {
  color: var(--slate-800);
  font-weight: 900;
}

.request-title-cell small,
.request-title-cell em {
  color: var(--slate-400);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.request-title-cell em {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 96px;
  margin-top: 8px;
}

.request-progress span {
  height: 5px;
  border-radius: 999px;
  background: var(--slate-100);
}

.request-progress span.done {
  background: var(--emerald-500);
}

.request-progress span.active {
  background: var(--amber-500);
}

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

.tiny-action {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 9px;
  background: rgba(236, 253, 245, 0.9);
  color: var(--emerald-700);
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.tiny-action:hover {
  background: var(--emerald-600);
  color: #fff;
}

.request-modal-lines {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.request-modal-lines-head {
  justify-content: space-between;
}

.request-line-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(82px, 0.35fr) minmax(120px, 0.45fr) 42px;
  gap: 10px;
  align-items: end;
}

.request-line-row label {
  margin: 0;
}

.request-modal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-200);
}

.request-modal-total span {
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-modal-total strong {
  color: var(--emerald-700);
  font-size: 1.12rem;
  font-weight: 900;
}

.request-detail-hero {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.95));
}

.request-detail-hero h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1.15rem;
  font-weight: 900;
}

.request-detail-hero p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 700;
}

.request-detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.request-detail-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: #fff;
}

.request-detail-stats strong {
  color: var(--slate-900);
  font-weight: 900;
}

.request-detail-stats small {
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-stage-track {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.request-stage-track span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-400);
  font-size: 0.72rem;
  font-weight: 900;
}

.request-stage-track span.done {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(236, 253, 245, 0.9);
  color: var(--emerald-700);
}

.request-stage-track span.active {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.9);
  color: #b45309;
}

.request-comments {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.request-comments-head {
  justify-content: space-between;
}

.request-comments article {
  padding: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: #fff;
}

.request-comments article strong,
.request-comments-head strong {
  color: var(--slate-800);
  font-weight: 900;
}

.request-comments article p {
  margin: 4px 0;
  color: var(--slate-600);
  font-size: 0.8rem;
  line-height: 1.45;
}

.request-comments article small {
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 800;
}

.request-comment-box {
  align-items: stretch;
}

.request-comment-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.pipeline-workspace {
  display: grid;
  gap: 24px;
}

.pipeline-head,
.pipeline-head-actions,
.pipeline-stage-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pipeline-head {
  align-items: flex-end;
  justify-content: space-between;
}

.pipeline-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pipeline-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.pipeline-head p {
  max-width: 900px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pipeline-kpi-grid,
.pipeline-grid,
.pipeline-stage-grid,
.pipeline-routing-grid {
  display: grid;
  gap: 16px;
}

.pipeline-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  align-items: start;
}

.pipeline-stage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipeline-routing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipeline-stage-card,
.pipeline-routing-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--slate-100);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.pipeline-stage-card-head {
  align-items: flex-start;
}

.pipeline-stage-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-700);
  font-size: 1.05rem;
}

.pipeline-stage-card strong,
.pipeline-routing-card strong {
  color: var(--slate-900);
  font-weight: 900;
}

.pipeline-stage-card small {
  display: block;
  margin-top: 3px;
  color: var(--slate-400);
  font-size: 0.7rem;
  font-weight: 800;
}

.pipeline-stage-card label {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-stage-card select,
.pipeline-stage-card input {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: #fff;
  color: var(--slate-700);
  font-size: 0.8rem;
  font-weight: 800;
}

.pipeline-routing-card {
  align-content: start;
}

.pipeline-routing-card p {
  margin: 5px 0 0;
  color: var(--slate-500);
  font-size: 0.74rem;
  line-height: 1.45;
  font-weight: 700;
}

.pipeline-routing-card label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--slate-100);
  border-radius: 13px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 900;
}

.backup-grid,
.backup-kpi-grid {
  display: grid;
  gap: 16px;
}

.backup-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
  margin-top: 24px;
  align-items: start;
}

.backup-command-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.72));
}

.backup-plan-card {
  grid-column: 1 / -1;
}

.backup-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 18px;
}

.backup-kpi-grid span {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 16px;
  background: #fff;
}

.backup-kpi-grid strong {
  color: var(--slate-900);
  font-size: 1.1rem;
  font-weight: 900;
}

.backup-status-card {
  min-width: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.98));
}

.backup-status-card strong {
  display: block;
  margin-top: 4px;
  color: var(--slate-900);
  font-size: 0.95rem;
  font-weight: 900;
}

.backup-status-card p {
  margin: 4px 0 0;
}

.integration-plan-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.integration-plan-item {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.integration-plan-item strong {
  display: block;
  color: var(--slate-900);
  font-size: 0.86rem;
  font-weight: 900;
}

.integration-plan-item p {
  margin: 3px 0 0;
  line-height: 1.45;
}

.integration-plan-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--sky-600);
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
}

.integration-plan-icon.ok {
  color: var(--emerald-700);
  background: var(--emerald-50);
  border-color: var(--emerald-200);
}

.integration-plan-icon.warn {
  color: var(--amber-700);
  background: var(--amber-50);
  border-color: var(--amber-200);
}

.integration-plan-icon.danger {
  color: var(--rose-700);
  background: var(--rose-50);
  border-color: var(--rose-200);
}

.backup-kpi-grid small {
  color: var(--slate-400);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.industry-preset-card,
.industry-template-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.96));
}

.industry-template-card {
  justify-content: space-between;
  margin-top: 16px;
}

.industry-preset-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 14px 26px rgba(5, 150, 105, 0.22);
}

.industry-preset-card h4,
.industry-template-card strong {
  margin: 3px 0 4px;
  color: var(--slate-900);
  font-size: 0.95rem;
  font-weight: 900;
}

.industry-preset-card p,
.industry-template-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 700;
}

.industry-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.industry-chip-row span {
  padding: 5px 9px;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--emerald-700);
  font-size: 0.65rem;
  font-weight: 900;
}

.supplier-workspace {
  display: grid;
  gap: 24px;
}

.supplier-head,
.supplier-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.supplier-head {
  align-items: flex-end;
  justify-content: space-between;
}

.supplier-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.supplier-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.supplier-head p {
  max-width: 900px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.supplier-kpi-grid,
.supplier-card-grid,
.supplier-lower-grid,
.supplier-performance-grid,
.supplier-detail-grid {
  display: grid;
  gap: 16px;
}

.supplier-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.supplier-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.supplier-view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
}

.supplier-view-toggle button {
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
}

.supplier-view-toggle button.active {
  background: #fff;
  color: var(--emerald-600);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.supplier-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-card {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--slate-100);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.supplier-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.supplier-avatar {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(5, 150, 105, 0.24);
}

.supplier-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.supplier-card p {
  margin: -8px 0 0;
  min-height: 22px;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.supplier-stars {
  display: inline-flex;
  gap: 3px;
  color: #f59e0b;
  font-size: 0.86rem;
}

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

.supplier-card-metrics span {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: #fff;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.supplier-card-metrics strong {
  color: var(--slate-800);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.supplier-readiness {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.supplier-readiness span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-500), #14b8a6);
}

.supplier-lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: start;
}

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

.supplier-performance-card,
.supplier-detail-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.supplier-performance-card {
  border-left: 4px solid var(--emerald-500);
}

.supplier-performance-card.warn {
  border-left-color: var(--amber-500);
}

.supplier-performance-card.danger {
  border-left-color: var(--rose-500);
}

.supplier-performance-card span,
.supplier-detail-grid span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplier-performance-card strong,
.supplier-detail-grid strong {
  color: var(--slate-800);
  font-size: 1rem;
  font-weight: 900;
}

.supplier-performance-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 700;
}

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

.po-workspace {
  display: grid;
  gap: 24px;
}

.po-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.po-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.po-head p {
  max-width: 820px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.po-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.po-kpi-grid,
.po-integration-grid {
  display: grid;
  gap: 16px;
}

.po-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.po-filterbar {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 200px));
  gap: 12px;
  align-items: center;
}

.po-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.po-number-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 3px 8px;
  border: 1.5px solid #111827;
  border-radius: 2px;
  background: #fff;
  color: #000;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.po-number-tag:hover {
  background: var(--slate-50);
  color: var(--emerald-700);
  border-color: var(--emerald-700);
}

.movement-shell {
  display: grid;
  gap: 20px;
}

.movement-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.movement-head h2 {
  margin: 8px 0 6px;
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.movement-head p {
  max-width: 880px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
}

.movement-kpi-grid,
.movement-insight-grid,
.movement-source-grid {
  display: grid;
  gap: 16px;
}

.movement-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movement-insight-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
}

.movement-filterbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(150px, 200px)) auto;
  gap: 12px;
  align-items: center;
}

.movement-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.movement-source-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movement-source-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.movement-source-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  color: var(--sky-600);
  box-shadow: var(--shadow-sm);
}

.movement-source-icon.ok {
  color: var(--emerald-700);
}

.movement-source-icon.warn {
  color: var(--amber-600);
}

.movement-source-icon.danger {
  color: var(--rose-600);
}

.movement-source-card strong,
.movement-source-card small {
  display: block;
}

.movement-source-card small {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 800;
}

.movement-ledger-table td {
  vertical-align: top;
}

.movement-ledger-table small {
  font-size: 0.72rem;
}

.movement-mobile-list {
  display: none;
  margin-top: 14px;
}

.movement-exception-item .row-actions {
  justify-content: flex-start;
}

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

.po-approval-card {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--amber-500);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
  box-shadow: var(--shadow-soft);
}

.po-approval-card.urgent,
.po-approval-card.high {
  border-left-color: var(--rose-500);
}

.po-approval-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.po-approval-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.po-approval-card p,
.po-approval-card small {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 700;
}

.po-approval-card small {
  color: var(--slate-400);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.po-approval-card strong {
  font-size: 1.15rem;
  font-weight: 900;
}

.po-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 24px;
  align-items: start;
}

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

.po-integration-card {
  padding: 16px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.po-integration-card i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.po-integration-card span,
.po-detail-summary span,
.po-detail-grid span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.po-integration-card strong {
  font-size: 1.35rem;
  font-weight: 900;
}

.po-integration-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 700;
}

.po-modal-lines {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.po-modal-lines-head,
.po-modal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.po-line-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1.1fr) 92px 120px 42px;
  gap: 10px;
  align-items: end;
}

.po-line-row label {
  margin: 0;
}

.po-modal-total {
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--slate-900);
  color: #fff;
}

.po-modal-total span {
  color: var(--slate-300);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.po-modal-total strong {
  font-size: 1.15rem;
  font-weight: 900;
}

.po-detail-summary,
.po-detail-grid {
  display: grid;
  gap: 10px;
}

.po-detail-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.po-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.po-detail-summary > div,
.po-detail-grid article {
  padding: 13px;
  border: 1px solid var(--slate-100);
  border-radius: 16px;
  background: var(--slate-50);
}

.po-detail-summary strong,
.po-detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 900;
}

.admin-module-workspace {
  display: grid;
  gap: 24px;
}

.admin-module-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-module-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-module-head p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.admin-kpi-grid,
.admin-card-grid {
  display: grid;
  gap: 16px;
}

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

.admin-two-grid,
.data-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

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

.admin-record-card {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
  box-shadow: var(--shadow-soft);
}

.admin-record-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0;
}

.admin-record-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 700;
}

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

.admin-mini-grid span {
  padding: 10px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: #fff;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-mini-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--slate-800);
  font-size: 0.76rem;
  text-transform: none;
}

.admin-filterbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 220px));
  gap: 12px;
  align-items: center;
}

.admin-filterbar select,
.import-step-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.84rem;
  font-weight: 800;
}

.audit-filterbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.audit-filterbar .audit-search-field {
  flex: 1 1 420px;
  min-width: 260px;
}

.audit-filterbar select {
  flex: 0 0 220px;
  width: 220px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--slate-50);
  color: var(--slate-700);
  outline: none;
  font-size: 0.84rem;
  font-weight: 800;
}

.audit-filterbar select:focus {
  border-color: var(--emerald-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
}

.audit-date-field {
  position: relative;
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
  height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--slate-50);
  color: var(--slate-500);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.audit-date-field:focus-within {
  border-color: var(--emerald-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
}

.audit-date-field > i {
  justify-self: center;
  color: var(--slate-400);
  font-size: 0.92rem;
}

.audit-date-display {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--slate-700);
  outline: none;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.audit-date-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.audit-date-field input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.58;
}

.audit-date-field > button:not(.audit-date-display) {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
}

.audit-date-field > button:not(.audit-date-display):hover {
  background: var(--slate-200);
  color: var(--slate-700);
}

.import-step-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.import-step-grid label,
.data-template-box,
.data-result-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.import-step-grid label {
  display: grid;
  gap: 8px;
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-template-box {
  display: grid;
  gap: 8px;
}

.data-template-box code {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--slate-700);
  font-size: 0.78rem;
  line-height: 1.45;
}

.data-result-box:empty {
  display: none;
}

.users-workspace {
  display: grid;
  gap: 24px;
}

.users-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.users-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.users-head p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.users-kpi-grid,
.roles-grid,
.departments-grid,
.access-risk-grid {
  display: grid;
  gap: 16px;
}

.users-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.users-tabs {
  width: fit-content;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-100);
}

.users-tab {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.8rem;
  font-weight: 900;
}

.users-tab.active {
  border-color: var(--slate-200);
  background: #fff;
  color: var(--emerald-700);
  box-shadow: var(--shadow-soft);
}

.users-pane {
  display: none;
}

.users-pane.active {
  display: block;
}

.users-filterbar {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(130px, 180px));
  gap: 12px;
  align-items: center;
}

.users-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar,
.department-members span,
.department-icon {
  display: grid;
  place-items: center;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 900;
}

.user-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
}

.user-cell strong,
.user-cell small,
.user-cell em {
  display: block;
}

.user-cell small {
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-cell em {
  color: var(--slate-400);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

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

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

.role-card,
.department-card,
.access-risk-card {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
  box-shadow: var(--shadow-soft);
}

.role-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-card-top > span:last-child {
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.role-card h3,
.department-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.role-card p,
.department-card p,
.access-risk-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 700;
}

.permission-list {
  display: grid;
  gap: 8px;
}

.permission-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-600);
  font-size: 0.78rem;
  font-weight: 800;
}

.permission-list i {
  color: var(--emerald-600);
}

.department-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.department-members {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.department-members span {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.department-members em {
  color: var(--slate-400);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

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

.access-risk-card strong {
  font-size: 1.45rem;
  font-weight: 900;
}

.access-risk-card > span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-risk-card.danger strong {
  color: var(--rose-600);
}

.access-risk-card.warn strong {
  color: var(--amber-600);
}

.access-risk-card.info strong {
  color: var(--sky-600);
}

.access-risk-card.ok strong {
  color: var(--emerald-600);
}

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

.checkbox-grid label,
.modal-note {
  padding: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 14px;
  background: var(--slate-50);
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 800;
}

.modal-note {
  display: flex;
  gap: 10px;
  color: var(--slate-500);
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 700;
}

.badge.neutral {
  background: var(--slate-100);
  color: var(--slate-600);
}

.helpdesk-workspace {
  display: grid;
  gap: 24px;
}

.helpdesk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.helpdesk-head h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.helpdesk-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.helpdesk-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.helpdesk-filterbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 12px;
  align-items: center;
}

.helpdesk-filterbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.84rem;
  font-weight: 800;
}

.helpdesk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.helpdesk-table .table-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate-900);
  font-weight: 900;
  text-align: left;
}

.helpdesk-table .table-link:hover {
  color: var(--emerald-700);
}

.selected-row {
  background: var(--emerald-50);
}

.mono-chip {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 7px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-500);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 900;
}

.helpdesk-detail-panel {
  position: sticky;
  top: 98px;
}

.helpdesk-detail-body {
  display: grid;
  gap: 16px;
}

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

.helpdesk-detail-grid div,
.ticket-description,
.ticket-reply {
  border: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.helpdesk-detail-grid div {
  padding: 13px;
  border-radius: 16px;
}

.helpdesk-detail-grid span {
  display: block;
  color: var(--slate-400);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.helpdesk-detail-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 0.88rem;
  font-weight: 900;
}

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

.warn-text {
  color: var(--amber-600);
}

.info-text {
  color: var(--sky-600);
}

.ticket-description {
  padding: 16px;
  border-radius: 18px;
}

.ticket-description p {
  margin: 8px 0 0;
  color: var(--slate-600);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 600;
}

.ticket-thread {
  display: grid;
  gap: 10px;
}

.ticket-reply {
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  border-radius: 16px;
}

.reply-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.ticket-reply strong,
.ticket-reply span {
  display: block;
}

.ticket-reply span {
  margin-top: 2px;
  color: var(--slate-400);
  font-size: 0.72rem;
  font-weight: 800;
}

.ticket-reply p {
  margin: 8px 0 0;
  color: var(--slate-700);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ticket-reply-form {
  display: grid;
  gap: 10px;
}

.ticket-reply-form textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  resize: vertical;
  background: #fff;
}

.ticket-reply-form button {
  justify-content: center;
}

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

.reports-workspace {
  display: grid;
  gap: 24px;
}

.reports-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.reports-head h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.reports-head p {
  max-width: 820px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.55;
}

.reports-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.reports-tabs {
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-100);
}

.reports-tabs button {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.reports-tabs button.active {
  background: #fff;
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}

.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.reports-main-panel {
  display: grid;
  gap: 18px;
}

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

.report-insight-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.report-insight-card span {
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-insight-card strong {
  display: block;
  margin-top: 7px;
  color: var(--slate-900);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 900;
}

.report-insight-card p {
  margin: 9px 0 0;
  color: var(--slate-500);
  font-size: 0.76rem;
  line-height: 1.45;
  font-weight: 700;
}

.report-chart-card {
  padding: 18px;
  border: 1px solid var(--slate-100);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, var(--slate-50));
}

.report-bars {
  display: grid;
  gap: 12px;
}

.report-bar-row {
  display: grid;
  gap: 8px;
}

.report-bar-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.report-bar-row strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.report-bar-row span {
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 900;
}

.reports-risk-panel {
  position: sticky;
  top: 98px;
}

.report-table td:first-child {
  font-weight: 900;
}

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

.metric-card,
.panel,
.record-card,
.timeline-item,
.list-row {
  border: 1px solid var(--slate-200);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.metric-card {
  min-height: 132px;
  padding: 22px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--emerald-50);
}

.metric-card i {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 1.15rem;
}

.metric-card.risk i,
.metric-card.risk::after {
  background: var(--rose-50);
  color: var(--rose-600);
}

.metric-card.action i,
.metric-card.action::after {
  background: var(--amber-50);
  color: var(--amber-600);
}

.metric-card span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 4px;
  color: var(--slate-900);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.command-metrics .metric-card {
  min-height: 118px;
}

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

.capital-panel,
.budget-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 1.2rem;
}

.panel-icon.warn {
  background: var(--amber-50);
  color: var(--amber-600);
}

.value-band {
  padding: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 28px;
  background: var(--slate-50);
}

.value-band span,
.split-stat span {
  display: block;
  color: var(--slate-400);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-band strong {
  display: block;
  margin-top: 5px;
  color: var(--emerald-600);
  font-size: clamp(1.2rem, 3vw, 2.1rem);
  line-height: 1;
  font-weight: 900;
}

.mini-bars {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.mini-bar {
  padding: 12px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.mini-bar > div:first-child {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 900;
}

.mini-bar span {
  color: var(--emerald-600);
  white-space: nowrap;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-200);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-500), var(--sky-600));
}

.budget-ring {
  min-height: 142px;
  padding: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--slate-100);
  border-radius: 30px;
  background: radial-gradient(circle at top, var(--amber-50), #fff 68%);
}

.budget-ring strong,
.budget-ring span {
  display: block;
}

.budget-ring strong {
  color: var(--slate-900);
  font-size: 1.65rem;
  font-weight: 900;
}

.budget-ring span {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 800;
}

.split-stat {
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--slate-100);
}

.split-stat strong {
  color: var(--slate-900);
}

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

.risk-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.risk-panel .stack-list {
  min-height: 210px;
  align-content: start;
}

.risk-panel .small-button {
  width: 100%;
}

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

.timeline.compact {
  max-height: 360px;
  overflow: auto;
}

.work-queue-banner {
  margin-bottom: 24px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--slate-800);
  border-radius: var(--radius-hero);
  background: linear-gradient(135deg, var(--slate-900), #020617 58%, #022c22);
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.work-queue-banner h2 {
  margin: 12px 0 6px;
  font-size: clamp(1.4rem, 2.8vw, 2.15rem);
  font-weight: 900;
}

.work-queue-banner p {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.86rem;
  font-weight: 700;
}

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

.queue-stat {
  min-height: 92px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.queue-stat i {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 1.05rem;
}

.queue-stat.danger i {
  background: var(--rose-50);
  color: var(--rose-600);
}

.queue-stat.warn i {
  background: var(--amber-50);
  color: var(--amber-600);
}

.queue-stat span,
.queue-stat strong {
  display: block;
}

.queue-stat span {
  color: var(--slate-400);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.queue-stat strong {
  color: var(--slate-900);
  font-size: 1.3rem;
  font-weight: 900;
}

.inventory-engine {
  display: grid;
  gap: 24px;
}

.inventory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.inventory-head h2 {
  margin: 0 0 5px;
  color: var(--slate-900);
  font-size: 1.55rem;
  font-weight: 900;
}

.inventory-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  font-weight: 700;
}

.inventory-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.inventory-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.inventory-stat-grid article {
  min-height: 118px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.inventory-stat-grid i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 1.05rem;
}

.inventory-stat-grid .warn i {
  background: var(--amber-50);
  color: var(--amber-600);
}

.inventory-stat-grid .danger i {
  background: var(--rose-50);
  color: var(--rose-600);
}

.inventory-stat-grid span {
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.inventory-stat-grid strong {
  color: var(--slate-900);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.inventory-tabs {
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-radius: 22px;
  background: var(--slate-50);
}

.inventory-tab {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.inventory-tab.active {
  border-color: var(--slate-200);
  background: #fff;
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}

.inventory-pane {
  display: none;
}

.inventory-pane.active {
  display: block;
}

.inventory-pane-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inventory-pane-head h3 {
  margin: 0 0 4px;
  color: var(--slate-900);
  font-size: 1.05rem;
  font-weight: 900;
}

.inventory-toolbar {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.35fr) minmax(160px, 0.35fr) 48px;
  gap: 12px;
  align-items: center;
}

.inventory-search {
  position: relative;
}

.inventory-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  color: var(--slate-400);
  transform: translateY(-50%);
}

.inventory-search input,
.inventory-toolbar select,
.scanner-input-row input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.8rem;
  font-weight: 800;
}

.inventory-search input {
  padding-left: 42px;
}

.inventory-toolbar .icon-button.active {
  background: var(--amber-50);
  color: var(--amber-600);
}

.inventory-table td {
  vertical-align: middle;
}

.stock-level {
  min-width: 160px;
  display: grid;
  gap: 7px;
}

.stock-level strong {
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 900;
}

.stock-level small {
  color: var(--slate-500);
  font-size: 0.68rem;
  font-weight: 800;
}

.inventory-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.inventory-action-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fff;
  color: var(--slate-400);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.inventory-action-button:hover {
  border-color: var(--emerald-600);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.inventory-action-button.danger:hover {
  border-color: var(--rose-600);
  background: var(--rose-50);
  color: var(--rose-600);
}

.inventory-action-button:active {
  transform: scale(0.96);
}

.stocktake-shell {
  display: grid;
  gap: 22px;
}

.stocktake-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stocktake-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.stocktake-head p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
}

.stocktake-stat-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stocktake-stat-grid article {
  min-height: 108px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stocktake-stat-grid i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--emerald-50);
  color: var(--emerald-600);
}

.stocktake-stat-grid .warn i {
  background: var(--amber-50);
  color: var(--amber-600);
}

.stocktake-stat-grid .danger i {
  background: var(--rose-50);
  color: var(--rose-600);
}

.stocktake-stat-grid span {
  display: block;
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stocktake-stat-grid strong {
  display: block;
  color: var(--slate-900);
  font-size: 1.45rem;
  font-weight: 900;
}

.stocktake-layout {
  align-items: start;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.35fr);
}

.stocktake-session-list,
.stocktake-detail-body,
.stocktake-grid {
  display: grid;
  gap: 12px;
}

.stocktake-session {
  width: 100%;
  padding: 16px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: var(--slate-50);
  color: var(--slate-900);
  text-align: left;
}

.stocktake-session.active {
  border-color: var(--emerald-600);
  background: var(--emerald-50);
}

.stocktake-session strong {
  font-size: 0.95rem;
  font-weight: 900;
}

.stocktake-session small {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
}

.stocktake-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.35fr);
  gap: 12px;
}

.stocktake-tools select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.8rem;
  font-weight: 800;
}

.stocktake-item {
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: #fff;
}

.stocktake-item > div:first-child strong,
.stocktake-item > div:first-child span {
  display: block;
}

.stocktake-counts {
  display: grid;
  grid-template-columns: minmax(100px, 0.28fr) minmax(100px, 0.28fr) minmax(180px, 1fr);
  gap: 10px;
}

.stocktake-counts label {
  display: grid;
  gap: 6px;
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stocktake-counts input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.danger-soft {
  border-color: var(--rose-100) !important;
  background: var(--rose-50) !important;
  color: var(--rose-600) !important;
}

.success-soft {
  border-color: var(--emerald-100) !important;
  background: var(--emerald-50) !important;
  color: var(--emerald-700) !important;
}

.inventory-category-grid,
.inventory-intel-grid,
.inventory-scanner-grid,
.quick-action-grid {
  display: grid;
  gap: 18px;
}

.inventory-category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-category-card {
  min-height: 190px;
  padding: 22px;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.inventory-category-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-category-card i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-600);
}

.inventory-category-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

.inventory-category-card strong {
  color: var(--emerald-700);
  font-size: 1.25rem;
  font-weight: 900;
}

.inventory-scanner-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.scanner-box {
  min-height: 240px;
  padding: 26px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed var(--emerald-200);
  border-radius: 28px;
  background: var(--emerald-50);
  text-align: center;
}

.scanner-box > i {
  color: var(--emerald-600);
  font-size: 3rem;
}

.scanner-box strong {
  color: var(--slate-900);
  font-size: 1.15rem;
  font-weight: 900;
}

.scanner-input-row {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.scanner-result {
  margin-top: 16px;
}

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

.quick-action-grid button {
  min-height: 116px;
  padding: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.8rem;
  font-weight: 900;
}

.quick-action-grid i {
  color: var(--emerald-600);
  font-size: 1.5rem;
}

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

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

.ai-insight-grid div {
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.ai-insight-grid span,
.ai-insight-grid strong {
  display: block;
}

.ai-insight-grid span {
  color: var(--slate-400);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-insight-grid strong {
  margin-top: 5px;
  color: var(--slate-900);
  font-size: 0.82rem;
  font-weight: 900;
}

.label-preview {
  padding: 0;
}

.inventory-label {
  max-width: 380px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.inventory-label h2 {
  margin: 8px 0 4px;
  color: var(--slate-900);
  font-size: 1.05rem;
  font-weight: 900;
}

.inventory-label p {
  margin: 6px 0;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 800;
}

.inventory-label strong {
  display: block;
  color: var(--slate-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 900;
}

.label-code {
  width: 220px;
  height: 74px;
  margin: 18px auto 12px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--slate-900) 0 3px, #fff 3px 7px, var(--slate-900) 7px 10px, #fff 10px 16px);
}

.label-qr {
  width: 94px;
  height: 94px;
  margin: 14px auto;
  border: 8px solid var(--slate-900);
  border-radius: 8px;
  background: conic-gradient(var(--slate-900) 25%, #fff 0 50%, var(--slate-900) 0 75%, #fff 0);
}

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

.work-queue-grid .panel {
  display: flex;
  flex-direction: column;
}

.work-queue-grid .stack-list {
  min-height: 160px;
  align-content: start;
}

.pos-card {
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

.sales-workspace {
  display: grid;
  gap: 24px;
}

.sales-page-head {
  margin-bottom: 8px;
}

.sales-page-head h2 {
  margin: 0 0 4px;
  color: var(--slate-900);
  font-size: 1.45rem;
  font-weight: 900;
}

.sales-page-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.86rem;
  font-weight: 700;
}

.sales-tabs {
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-radius: 22px;
  background: var(--slate-50);
}

.sales-tab {
  min-height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.sales-tab.active {
  border-color: var(--slate-200);
  background: #fff;
  color: var(--emerald-700);
  box-shadow: var(--shadow-sm);
}

.sales-pane {
  display: none;
}

.sales-pane.active {
  display: block;
}

.sales-pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.sales-pos-left {
  display: grid;
  gap: 22px;
}

.pos-product-toolbar {
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 34px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pos-product-search {
  width: min(320px, 100%);
  position: relative;
}

.pos-product-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
}

.pos-product-search input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 700;
}

.scan-button {
  min-width: 210px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--emerald-100);
  border-radius: 14px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.74rem;
  font-weight: 900;
}

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

.pos-product-card {
  min-height: 210px;
  padding: 34px 30px 28px;
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid var(--slate-200);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pos-product-card > span {
  color: var(--slate-400);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-product-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 0.9rem;
  font-weight: 900;
}

.pos-product-card p {
  margin: 0 0 22px;
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 800;
}

.pos-product-card > div {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--slate-100);
}

.pos-product-card > div > strong {
  color: var(--emerald-700);
  font-size: 1rem;
  font-weight: 900;
}

.pos-product-card button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 1.05rem;
}

.pos-cart-panel {
  min-height: 620px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--slate-200);
  border-radius: 34px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.pos-cart-head {
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--slate-100);
}

.pos-cart-head h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

.pos-cart-head button {
  border: 0;
  background: transparent;
  color: var(--rose-600);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-cart-list {
  min-height: 250px;
  padding: 24px 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.pos-cart-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--slate-400);
  text-align: center;
}

.pos-cart-empty i {
  font-size: 2.2rem;
}

.pos-cart-empty strong,
.pos-cart-empty span {
  display: block;
}

.pos-cart-empty strong {
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-cart-empty span {
  font-size: 0.76rem;
  font-weight: 700;
}

.pos-cart-item {
  min-height: 70px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 120px 30px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.pos-cart-item strong {
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 900;
}

.pos-cart-item span {
  display: block;
  margin-top: 4px;
  color: var(--emerald-700);
  font-size: 0.7rem;
  font-weight: 900;
}

.pos-cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pos-cart-qty button,
.pos-cart-qty input {
  width: 28px;
  height: 28px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-900);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.pos-cart-qty button {
  background: var(--slate-100);
}

.pos-cart-item > strong {
  text-align: right;
}

.pos-cart-remove {
  width: 30px;
  height: 30px;
  color: var(--slate-400);
  background: transparent;
}

.pos-cart-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}

.pos-cart-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.pos-cart-fields label {
  display: grid;
  gap: 8px;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-cart-fields input,
.pos-cart-fields select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.pos-cart-dispatch-fields {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pos-cart-dispatch-fields.hidden {
  display: none;
}

.pos-cart-dispatch-fields input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.pos-cart-summary {
  margin: 18px 0;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  border-radius: 20px;
  background: var(--slate-50);
}

.pos-cart-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pos-cart-summary span {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 800;
}

.pos-cart-summary strong {
  color: var(--slate-800);
  font-size: 0.8rem;
  font-weight: 900;
}

.pos-cart-summary .grand {
  padding-top: 10px;
  border-top: 1px solid var(--slate-200);
}

.pos-cart-summary .grand span {
  color: var(--slate-900);
  font-weight: 900;
}

.pos-cart-summary .grand strong {
  color: var(--emerald-700);
  font-size: 1rem;
}

.pos-complete-button {
  width: 100%;
  min-height: 48px;
}

.sales-command {
  min-height: 210px;
  padding: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--slate-800);
  border-radius: var(--radius-hero);
  background: linear-gradient(135deg, var(--slate-900), #111827 58%, #064e3b);
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.sales-command h2 {
  max-width: 680px;
  margin: 7px 0 8px;
  font-size: clamp(1.85rem, 3.8vw, 3.1rem);
  line-height: 0.98;
  font-weight: 900;
}

.sales-command p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
}

.sales-command .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.sales-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.sales-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
}

.sales-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
}

.sales-pos-panel,
.sales-pipeline-panel {
  min-height: 100%;
}

.pos-counter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.pos-counter-main {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--emerald-100);
  border-radius: 26px;
  background: var(--emerald-50);
}

.pos-counter-main strong {
  color: var(--slate-900);
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1;
  font-weight: 900;
}

.pos-counter-main .primary-button {
  width: fit-content;
}

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

.pos-tender-grid div {
  min-height: 82px;
  padding: 14px;
  display: grid;
  align-content: center;
  border: 1px solid var(--slate-100);
  border-radius: 20px;
  background: var(--slate-50);
}

.pos-tender-grid span,
.sales-item > span {
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-tender-grid strong {
  margin-top: 5px;
  color: var(--slate-900);
  font-weight: 900;
}

.sales-item-strip {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.sales-item {
  min-height: 68px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: #fff;
}

.sales-item strong,
.sales-pipeline-row strong {
  color: var(--slate-900);
  font-weight: 900;
}

.sales-item > span {
  color: var(--emerald-600);
  white-space: nowrap;
}

.sales-pipeline-row {
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.35fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--slate-100);
  border-radius: 20px;
  background: var(--slate-50);
}

.sales-pipeline-row .badge {
  margin-bottom: 8px;
}

.sales-pipeline-value {
  display: grid;
  gap: 9px;
  text-align: right;
}

.sales-pipeline-value .progress-track {
  min-width: 130px;
}

.pos-checkout-shell {
  padding: 0;
  display: grid;
  gap: 18px;
}

.pos-checkout-head {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--emerald-100);
  border-radius: 26px;
  background: linear-gradient(135deg, var(--emerald-50), #fff);
}

.pos-checkout-head strong {
  display: block;
  margin-top: 6px;
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.pos-checkout-head p {
  margin: 6px 0 0;
}

.pos-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.pos-checkout-fields {
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--slate-100);
  border-radius: 24px;
  background: var(--slate-50);
}

.pos-checkout-inline {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr);
  gap: 14px;
}

.pos-cart-builder {
  display: grid;
  gap: 10px;
}

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

.pos-cart-builder-head span {
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-cart-builder-head .small-button {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pos-line-list {
  display: grid;
  gap: 10px;
}

.pos-line-row {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, 0.24fr) 38px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: #fff;
}

.pos-line-remove {
  width: 38px;
  height: 38px;
  color: var(--rose-600);
  background: var(--rose-50);
}

.receive-stock-shell {
  display: grid;
  gap: 16px;
}

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

.receive-without-po {
  min-height: 44px;
  padding: 10px 12px;
  align-self: end;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-700) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.receive-without-po input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--emerald-600);
}

.receive-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.receive-lines-head strong {
  color: var(--slate-900);
  font-size: 0.92rem;
  font-weight: 900;
}

.receive-line-list {
  display: grid;
  gap: 10px;
}

.receive-line-row {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr)) 38px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.receive-line-row label:first-child {
  grid-column: span 2;
}

.receive-line-remove {
  width: 38px;
  height: 38px;
  color: var(--rose-600);
  background: var(--rose-50);
}

.fefo-preview {
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--emerald-100);
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 0.78rem;
}

.fefo-preview > div:first-child,
.fefo-preview > span {
  display: grid;
  gap: 2px;
}

.fefo-preview i {
  margin-right: 6px;
}

.fefo-preview strong {
  color: var(--slate-900);
  font-weight: 900;
}

.fefo-preview-list {
  display: grid;
  gap: 6px;
}

.fefo-preview-list span {
  padding: 8px 10px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.receive-summary {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--emerald-100);
  border-radius: 16px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.pos-method-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pos-method-strip button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
  color: var(--slate-600);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.pos-method-strip button:hover {
  border-color: var(--emerald-200);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.pos-method-strip button.active {
  border-color: var(--emerald-600);
  background: var(--emerald-600);
  color: #fff;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.18);
}

.pos-method-strip button:active {
  transform: scale(0.98);
}

.pos-method-strip i {
  color: var(--emerald-600);
  font-size: 0.9rem;
}

.pos-method-strip button.active i {
  color: #fff;
}

.pos-receipt-preview {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 12px;
  border-radius: 26px;
  background: var(--slate-900);
  color: #fff;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18);
}

.receipt-topline,
.receipt-row,
.receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.receipt-topline {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-topline span,
.receipt-row span,
.receipt-total span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-topline strong {
  color: #86efac;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
}

.receipt-item-name {
  margin: 4px 0 8px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}

.receipt-lines {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-line-item {
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.receipt-line-item span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
}

.receipt-line-item strong {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.receipt-row {
  min-height: 30px;
}

.receipt-row strong {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.receipt-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.receipt-total strong {
  color: #86efac;
  font-size: 1.35rem;
  font-weight: 900;
}

.pos-checkout-submit {
  width: 100%;
  min-height: 48px;
}

.payment-confirm-summary {
  padding: 18px;
  border: 1px solid var(--emerald-100);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--emerald-50), #fff);
}

.payment-confirm-summary h3 {
  margin: 10px 0 4px;
  color: var(--slate-900);
  font-size: 1.05rem;
  font-weight: 900;
}

.payment-confirm-summary strong {
  display: block;
  margin-top: 10px;
  color: var(--emerald-700);
  font-size: 1.45rem;
  font-weight: 900;
}

.invoice-preview {
  padding: 0;
}

.invoice-sheet {
  padding: 24px;
  border: 1px solid var(--slate-200);
  border-radius: 26px;
  background: #fff;
}

.invoice-sheet-head {
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--slate-100);
}

.invoice-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.invoice-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.invoice-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.invoice-brand strong,
.invoice-party-grid strong {
  display: block;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

.invoice-brand span,
.invoice-number-block p,
.invoice-party-grid p {
  display: block;
  margin: 3px 0 0;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.invoice-number-block {
  text-align: right;
}

.invoice-number-block h3 {
  margin: 8px 0 4px;
  color: var(--slate-900);
  font-size: 1.1rem;
  font-weight: 900;
}

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

.invoice-party-grid > div {
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: var(--slate-50);
}

.invoice-line-table {
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
}

.invoice-line-head,
.invoice-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 130px;
  gap: 12px;
  align-items: center;
}

.invoice-line-head {
  padding: 12px 14px;
  background: var(--slate-50);
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-line-row {
  padding: 14px;
  border-top: 1px solid var(--slate-100);
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.invoice-line-row span:nth-child(2),
.invoice-line-row strong {
  text-align: right;
}

.invoice-line-row strong {
  color: var(--slate-900);
  font-weight: 900;
}

.invoice-total-box {
  width: min(360px, 100%);
  margin: 20px 0 0 auto;
  display: grid;
  gap: 8px;
}

.invoice-total-box div {
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--slate-100);
}

.invoice-total-box span {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 800;
}

.invoice-total-box strong {
  color: var(--slate-900);
  font-weight: 900;
  text-align: right;
}

.invoice-total-box .grand strong {
  color: var(--emerald-700);
  font-size: 1.35rem;
}

.invoice-note {
  margin: 18px 0 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-page-head {
  max-width: 980px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-page-head h2 {
  margin: 0 0 5px;
  color: var(--slate-900);
  font-size: 1.45rem;
  font-weight: 900;
}

.profile-page-head p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 700;
}

.profile-top-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 18px;
  border-left: 1px solid var(--slate-200);
}

.profile-top-chip > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 900;
}

.profile-top-chip strong,
.profile-top-chip small {
  display: block;
  white-space: nowrap;
}

.profile-top-chip strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.profile-top-chip small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-layout {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
}

.profile-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.profile-card,
.profile-menu,
.profile-panel {
  border: 1px solid var(--slate-200);
  border-radius: 32px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.profile-card {
  position: relative;
  min-height: 252px;
  padding: 28px 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  background: var(--emerald-600);
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  box-shadow: var(--shadow-emerald);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload {
  position: absolute;
  top: 90px;
  right: 77px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-600);
  box-shadow: var(--shadow-sm);
}

.profile-card h3 {
  margin: 22px 0 6px;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

.profile-card p {
  margin: 0 0 20px;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-menu {
  padding: 20px;
  display: grid;
  gap: 8px;
}

.profile-menu button {
  min-height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--slate-900);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.profile-menu button.active {
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.profile-menu i,
.profile-panel-title i {
  color: var(--emerald-600);
}

.profile-content {
  display: grid;
  gap: 22px;
}

.profile-panel {
  padding: 28px;
}

.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
}

#profileInfoPane.active + #profileSecurityPane.active {
  display: block;
}

.profile-panel-title {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-panel-title h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

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

.profile-form label {
  display: grid;
  gap: 9px;
  color: var(--slate-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-900);
  outline: none;
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-form input:focus {
  border-color: var(--emerald-600);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
}

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

.profile-submit {
  justify-self: end;
  grid-column: 1 / -1;
  min-width: 160px;
  background: var(--emerald-600);
  box-shadow: var(--shadow-emerald);
}

.profile-submit:hover {
  background: var(--emerald-700);
}

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

.profile-activity-grid div {
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.profile-activity-grid span,
.profile-activity-grid strong {
  display: block;
}

.profile-activity-grid span {
  color: var(--slate-400);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-activity-grid strong {
  margin-top: 4px;
  color: var(--slate-800);
  font-size: 0.78rem;
  font-weight: 900;
}

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

.section-gap {
  margin-top: 24px;
}

.panel {
  padding: 24px;
  border-radius: 32px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-100);
}

.panel-header h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 900;
}

.stack-list,
.card-grid,
.timeline {
  display: grid;
  gap: 12px;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.list-row,
.record-card,
.timeline-item {
  border-radius: 22px;
  background: var(--slate-50);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.list-row:hover,
.record-card:hover,
.timeline-item:hover {
  border-color: #bbf7d0;
  background: var(--emerald-50);
}

.list-row {
  min-height: 72px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.record-card,
.timeline-item {
  padding: 16px;
}

.record-card h3 {
  margin: 10px 0 6px;
  font-size: 1rem;
  font-weight: 900;
}

.list-row strong,
.record-card strong,
.timeline-item strong {
  display: block;
  color: var(--slate-900);
  font-weight: 900;
}

.muted {
  display: block;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
}

.eyebrow {
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.pagination-bar {
  margin-top: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--slate-50);
}

.pagination-summary,
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-summary strong {
  color: var(--slate-900);
  font-weight: 900;
}

.pagination-summary span,
.page-pill {
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-pill {
  padding: 8px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-700);
}

.pagination-controls select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: #fff;
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 800;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--slate-100);
  text-align: left;
}

th {
  background: rgba(248, 250, 252, 0.78);
  color: var(--slate-500);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: var(--slate-700);
  font-size: 0.88rem;
  font-weight: 700;
}

.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.ok {
  border-color: #a7f3d0;
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.badge.warn {
  border-color: #fde68a;
  background: var(--amber-50);
  color: var(--amber-600);
}

.badge.danger {
  border-color: #fecdd3;
  background: var(--rose-50);
  color: var(--rose-600);
}

.badge.info {
  border-color: #bae6fd;
  background: var(--sky-50);
  color: var(--sky-600);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
}

.floating-helpdesk {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 45;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border: 8px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: var(--emerald-500);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
}

.floating-helpdesk span {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--rose-600);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.floating-helpdesk-panel {
  position: fixed;
  right: 26px;
  bottom: 86px;
  z-index: 46;
  width: min(430px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 108px));
  display: grid;
  grid-template-rows: auto auto minmax(92px, 142px) minmax(0, 58px) auto;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.2);
}

.floating-helpdesk-panel.hidden {
  display: none;
}

.floating-helpdesk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
}

.floating-helpdesk-head > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.floating-helpdesk-head-icon {
  width: 40px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.floating-helpdesk-head .icon-button {
  width: 34px;
  height: 32px;
  flex: 0 0 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.floating-helpdesk-head strong,
.floating-helpdesk-head small {
  display: block;
}

.floating-helpdesk-head strong {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 900;
}

.floating-helpdesk-head small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
}

.floating-quick-actions,
.floating-officers,
.floating-helpdesk-list,
.floating-helpdesk-form,
.floating-helpdesk-open {
  margin-left: 24px;
  margin-right: 24px;
}

.floating-quick-actions {
  padding-top: 12px;
}

.floating-quick-actions > span,
.floating-officers > span {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-400);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.floating-quick-actions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.floating-quick-actions button {
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.floating-quick-actions button:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.floating-officers {
  padding-top: 10px;
  overflow: auto;
}

#floatingOfficerList {
  display: grid;
  gap: 7px;
}

.floating-officer-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-areas:
    "avatar name dot"
    "avatar role dot";
  column-gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 17px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.floating-officer-card:hover,
.floating-officer-card.active {
  border-color: rgba(16, 185, 129, 0.42);
  background: var(--emerald-50);
}

.floating-officer-card span {
  grid-area: avatar;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #d1fae5;
  color: var(--emerald-700);
  font-size: 0.72rem;
  font-weight: 900;
}

.floating-officer-card strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-officer-card small {
  grid-area: role;
  color: var(--slate-400);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.floating-officer-card em {
  grid-area: dot;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--emerald-500);
}

.floating-helpdesk-list {
  min-height: 0;
  max-height: 58px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 2px 0 0;
  border-top: 1px solid var(--slate-100);
}

.floating-ticket button,
.floating-helpdesk-empty {
  width: 100%;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--slate-100);
  border-radius: 16px;
  background: var(--slate-50);
  text-align: left;
}

.floating-ticket button {
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.floating-ticket button:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--emerald-50);
}

.floating-ticket strong,
.floating-ticket small,
.floating-helpdesk-empty strong,
.floating-helpdesk-empty span {
  display: block;
}

.floating-ticket strong {
  color: var(--slate-950);
  font-size: 0.82rem;
  font-weight: 900;
}

.floating-ticket small,
.floating-helpdesk-empty span {
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
}

.floating-helpdesk-form {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--slate-100);
}

.floating-helpdesk-form input,
.floating-helpdesk-form textarea,
.floating-helpdesk-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-800);
  font-size: 0.8rem;
  font-weight: 800;
}

.floating-helpdesk-form input,
.floating-helpdesk-form select {
  height: 34px;
  padding: 0 11px;
}

.floating-helpdesk-form textarea {
  resize: none;
  min-height: 44px;
  max-height: 50px;
  padding: 9px 11px;
}

.floating-helpdesk-form > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.floating-helpdesk-form .primary-button,
.floating-helpdesk-open {
  width: 100%;
  justify-content: center;
}

.floating-helpdesk-open {
  display: none;
}

.app-footer {
  margin: auto -40px -40px;
  min-height: 74px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
}

body:not(.is-authenticated) .app-footer {
  margin: auto 0 0;
}

.app-footer strong {
  color: var(--emerald-700);
  font-weight: 900;
}

.app-footer em {
  margin-left: auto;
  color: var(--slate-400);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-legal {
  flex-basis: 100%;
  color: var(--slate-400);
  font-size: 0.68rem;
  font-weight: 800;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: min(1120px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid var(--slate-200);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--slate-100);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

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

.form-grid.inline-form {
  padding: 0;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 10px 14px;
  color: var(--slate-900);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.form-grid textarea,
.form-grid .span-2 {
  grid-column: 1 / -1;
}

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

.modal-message {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--amber-100);
  border-radius: 22px;
  background: var(--amber-50);
  color: var(--slate-800);
}

.modal-message i {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--amber-600);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.modal-message p {
  margin: 0;
  color: var(--slate-700);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.danger-button {
  background: var(--rose-600) !important;
  box-shadow: 0 16px 32px rgba(225, 29, 72, 0.2) !important;
}

.settings-head {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.settings-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  font-weight: 700;
}

.settings-tabs {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 5px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: var(--slate-100);
}

.settings-tab {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.settings-tab.active {
  background: #fff;
  color: var(--emerald-600);
  box-shadow: var(--shadow-sm);
}

.settings-pane {
  display: none;
}

.settings-pane.active {
  display: block;
}

.settings-panel {
  overflow: hidden;
}

.danger-zone-panel {
  border-color: rgba(225, 29, 72, 0.22);
}

.danger-zone-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(225, 29, 72, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff1f2 0%, #fff 72%);
}

.danger-zone-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #ffe4e6;
  color: var(--rose-600);
  font-size: 1.35rem;
}

.danger-zone-card strong,
.danger-zone-card p {
  display: block;
}

.danger-zone-card strong {
  color: var(--slate-950);
  font-size: 0.98rem;
  font-weight: 900;
}

.danger-zone-card p {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.55;
}

.brand-preview,
.integration-banner,
.toggle-row,
.feature-toggle {
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: var(--slate-50);
}

.brand-preview {
  min-height: 92px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-preview > div:last-child {
  min-width: 0;
}

.brand-avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--emerald-600);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-emerald);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

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

.brand-preview strong {
  font-size: 1rem;
  font-weight: 900;
}

.brand-preview span {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.upload-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-banner {
  margin-bottom: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

.integration-banner h3,
.integration-banner p {
  margin: 0;
}

.integration-banner h3 {
  font-size: 1rem;
  font-weight: 900;
}

.integration-banner p {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 0.8rem;
  font-weight: 700;
}

.integration-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  color: var(--emerald-600);
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.settings-list-form,
.settings-list {
  display: grid;
  gap: 14px;
}

.workflow-row,
.toggle-row,
.feature-toggle {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workflow-row {
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: var(--slate-50);
}

.workflow-row h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 900;
}

.workflow-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-row span,
.feature-toggle span {
  display: grid;
  gap: 4px;
}

.toggle-row strong,
.feature-toggle strong {
  color: var(--slate-800);
  font-size: 0.9rem;
  font-weight: 900;
}

.toggle-row small,
.feature-toggle small {
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 700;
}

.toggle-row input[type="checkbox"],
.feature-toggle input[type="checkbox"],
.workflow-stages input[type="checkbox"] {
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--slate-300);
  position: relative;
  cursor: pointer;
  transition: background 0.16s ease;
}

.toggle-row input[type="checkbox"]::after,
.feature-toggle input[type="checkbox"]::after,
.workflow-stages input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease;
}

.toggle-row input[type="checkbox"]:checked,
.feature-toggle input[type="checkbox"]:checked,
.workflow-stages input[type="checkbox"]:checked {
  background: var(--emerald-600);
}

.toggle-row input[type="checkbox"]:checked::after,
.feature-toggle input[type="checkbox"]:checked::after,
.workflow-stages input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.stage-toggle {
  min-width: 112px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: #fff;
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.feature-toggle {
  align-items: center;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.feature-toggle:hover {
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

.admin-only,
.auth-only {
  display: none;
}

body.is-authenticated .admin-only,
body.is-authenticated .auth-only {
  display: flex;
}

body.is-authenticated .floating-helpdesk-panel.auth-only {
  display: grid;
}

body.is-authenticated .floating-helpdesk-panel.auth-only.hidden {
  display: none;
}

.role-hidden {
  display: none !important;
}

.empty-state {
  padding: 36px 20px;
  border: 1px dashed var(--slate-200);
  border-radius: 24px;
  color: var(--slate-400);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--slate-600);
  font-weight: 900;
}

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

  .dashboard-hero-grid,
  .dashboard-lower-grid,
  .sales-pos-layout,
    .pipeline-grid,
    .backup-grid,
    .request-grid,
    .supplier-lower-grid,
    .billing-status-grid,
    .billing-lower-grid,
    .budget-top-grid,
    .budget-lower-grid,
    .po-lower-grid,
    .admin-two-grid,
    .data-management-grid,
    .users-filterbar,
    .helpdesk-layout,
    .reports-grid,
  .inventory-scanner-grid,
  .sales-layout-grid,
  .sales-lower-grid {
    grid-template-columns: 1fr;
  }

  .risk-grid,
  .work-queue-grid,
    .pipeline-kpi-grid,
    .pipeline-stage-grid,
    .pipeline-routing-grid,
    .backup-kpi-grid,
    .request-kpi-grid,
    .request-detail-stats,
  .supplier-kpi-grid,
    .supplier-card-grid,
    .movement-kpi-grid,
    .movement-source-grid,
  .inventory-stat-grid,
  .inventory-category-grid,
  .inventory-intel-grid,
    .billing-plan-grid,
    .billing-module-grid,
    .budget-kpi-grid,
    .budget-category-grid,
    .supplier-performance-grid,
    .po-kpi-grid,
    .po-integration-grid,
    .po-approval-grid,
    .admin-kpi-grid,
    .admin-card-grid,
    .users-kpi-grid,
    .roles-grid,
    .departments-grid,
    .access-risk-grid,
    .helpdesk-stat-grid,
  .reports-kpi-grid,
  .report-insight-grid,
  .pos-product-grid,
  .sales-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .hero-actions .light-button {
    flex: 0 1 auto;
  }
}

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

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

  .workspace {
    padding: 0 20px 28px;
  }

  .topbar {
    margin: 0 -20px 22px;
    padding: 14px 20px;
  }

  .danger-zone-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .audit-filterbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .audit-filterbar .audit-search-field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .audit-filterbar select,
  .audit-date-field {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .metric-grid,
  .sales-kpi-grid,
    .pipeline-grid,
    .pipeline-kpi-grid,
    .pipeline-stage-grid,
    .pipeline-routing-grid,
    .backup-grid,
    .backup-kpi-grid,
    .industry-preset-card,
    .industry-template-card,
  .request-grid,
    .request-kpi-grid,
    .request-filterbar,
    .request-line-row,
    .request-detail-stats,
    .request-stage-track,
  .supplier-kpi-grid,
    .supplier-card-grid,
    .supplier-lower-grid,
    .supplier-performance-grid,
    .supplier-filterbar,
    .supplier-detail-grid,
  .inventory-stat-grid,
  .stocktake-stat-grid,
  .inventory-category-grid,
  .inventory-intel-grid,
  .stocktake-layout,
  .billing-status-grid,
  .billing-plan-grid,
  .billing-lower-grid,
    .billing-renewal,
    .budget-top-grid,
    .budget-lower-grid,
    .budget-kpi-grid,
    .budget-filterbar,
    .budget-check-grid,
    .budget-category-grid,
    .budget-line-row,
    .po-lower-grid,
    .po-kpi-grid,
    .po-integration-grid,
    .po-approval-grid,
    .po-filterbar,
    .po-line-row,
    .po-detail-summary,
    .po-detail-grid,
    .movement-head,
    .movement-insight-grid,
    .movement-filterbar,
    .admin-two-grid,
    .data-management-grid,
    .admin-kpi-grid,
    .admin-card-grid,
    .admin-filterbar,
    .import-step-grid,
    .users-kpi-grid,
    .users-filterbar,
    .roles-grid,
    .departments-grid,
    .access-risk-grid,
    .helpdesk-layout,
  .helpdesk-stat-grid,
  .helpdesk-filterbar,
  .helpdesk-detail-grid,
  .reports-grid,
  .reports-kpi-grid,
  .report-insight-grid,
  .pos-product-grid,
  .two-column,
  .profile-layout,
  .risk-grid,
  .work-queue-grid,
  .queue-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sidebar,
  .workspace {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar,
  .panel-header,
  .admin-module-head,
  .pipeline-head,
  .request-head,
  .supplier-head,
  .users-head,
  .po-head,
    .budget-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-filterbar {
    grid-template-columns: 1fr;
  }

  .movement-head .row-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .movement-ledger-table {
    display: none;
  }

  .movement-mobile-list {
    display: grid;
  }

  .budget-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .request-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pipeline-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .industry-preset-card,
  .industry-template-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplier-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .po-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .users-tabs {
    width: 100%;
  }

  .users-tab {
    flex: 1 1 140px;
  }

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

  .topbar-actions,
  .search-box,
  .search-box input {
    width: 100%;
  }

  .topbar-actions button:not(.top-icon-button):not(.top-profile-btn) {
    width: 100%;
  }

  .top-icon-button {
    width: 40px;
  }

  .top-dropdown,
  #topMessagesMenu {
    left: 0;
    right: auto;
  }

  .floating-helpdesk {
    right: 16px;
    bottom: 16px;
  }

  .floating-helpdesk-panel {
    right: 16px;
    bottom: 94px;
    max-height: calc(100vh - 112px);
  }

  .pos-product-toolbar,
  .inventory-toolbar,
  .pos-cart-fields,
  .pos-cart-dispatch-fields,
  .pos-cart-item {
    grid-template-columns: 1fr;
  }

  .pos-product-toolbar,
  .pos-cart-fields,
  .pos-cart-dispatch-fields,
  .pos-cart-item {
    align-items: stretch;
  }

  .pos-product-search,
  .scan-button {
    width: 100%;
  }

  .pos-cart-item > strong {
    text-align: left;
  }

  .hero-panel {
    padding: 24px;
    border-radius: 28px;
  }

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

  .hero-stats {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions .light-button {
    width: auto;
  }

  .list-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-head,
  .profile-page-head,
  .sales-command,
  .sales-page-head,
  .billing-head,
  .helpdesk-head,
  .reports-head,
  .inventory-head,
  .stocktake-head,
  .pos-product-toolbar,
  .workflow-row,
  .toggle-row,
  .feature-toggle,
  .work-queue-banner,
  .integration-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-top-chip {
    padding-left: 0;
    border-left: 0;
  }

  .profile-form,
  .profile-activity-grid,
  .billing-status-grid,
  .billing-plan-grid,
  .billing-lower-grid,
  .billing-renewal,
  .billing-module-grid,
  .pos-counter,
  .pos-checkout-grid,
  .pos-checkout-inline,
  .pos-line-row,
  .receive-source-grid,
  .receive-line-row,
  .sales-pipeline-row {
    grid-template-columns: 1fr;
  }

  .backup-status-card {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  .stocktake-tools,
  .stocktake-counts {
    grid-template-columns: 1fr;
  }

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

  .integration-plan-list {
    grid-template-columns: 1fr;
  }

  .integration-plan-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .integration-plan-item .badge {
    grid-column: 2;
    justify-self: flex-start;
  }

  .sales-command-actions,
  .sales-command-actions .light-button,
  .sales-pipeline-value,
  .sales-pipeline-value .progress-track {
    width: 100%;
  }

  .sales-command-actions {
    justify-content: flex-start;
  }

  .sales-pipeline-value {
    text-align: left;
  }

  .pos-checkout-head {
    flex-direction: column;
  }

  .invoice-sheet {
    padding: 18px;
  }

  .invoice-sheet-head,
  .invoice-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-number-block {
    text-align: left;
  }

  .invoice-party-grid {
    grid-template-columns: 1fr;
  }

  .invoice-line-head,
  .invoice-line-row {
    grid-template-columns: minmax(0, 1fr) 48px 96px;
  }

  .app-footer {
    margin: auto -16px -28px;
    padding: 18px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.is-authenticated) .app-footer {
    margin: auto 0 0;
  }

  .app-footer em {
    margin-left: 0;
  }

  .profile-submit {
    width: 100%;
  }

  .settings-tabs,
  .settings-tab {
    width: 100%;
  }

  .settings-tab {
    justify-content: center;
  }

  .helpdesk-detail-panel {
    position: static;
  }

  .reports-risk-panel {
    position: static;
  }
}
