/* ---------------------------------------------------------------------------
 * Self-hosted web fonts — Cairo is the unified project font (Arabic + Latin).
 * ---------------------------------------------------------------------------
 * Served from wwwroot/fonts/cairo/ so the factory server never touches the
 * network. Two subsets per weight (Arabic + Latin) selected via unicode-range
 * so the browser only downloads the subset it actually needs to render.
 *
 * IMPORTANT: @font-face is declared OUTSIDE @layer legacy on purpose. Some
 * browsers (notably older Safari + some Chromium versions) had issues with
 * @font-face inside cascade layers — declaring at the document root is the
 * safe form and has no downside.
 *
 * font-display: block => text is held INVISIBLE until Cairo loads, then
 * paints. Combined with <link rel="preload"> in _Layout.cshtml and the
 * service-worker precache, the invisible window is <50ms on second load.
 * --------------------------------------------------------------------------- */

/* Cairo — Arabic subset */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Regular.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Medium.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('/fonts/cairo/Cairo-SemiBold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Bold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url('/fonts/cairo/Cairo-ExtraBold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Black.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* Cairo — Latin subset (default unicode range so any non-Arabic char uses these files) */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Medium-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('/fonts/cairo/Cairo-SemiBold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Bold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url('/fonts/cairo/Cairo-ExtraBold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url('/fonts/cairo/Cairo-Black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer legacy {

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope/Manrope-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope/Manrope-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope/Manrope-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope/Manrope-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope/Manrope-800.ttf') format('truetype');
}

:root {
  --bg-900: #0f141b;
  --bg-800: #161d26;
  --bg-700: #202a36;
  --bg-600: #263241;
  --text-100: #f3f6fb;
  --text-200: #d3dceb;
  --text-300: #8ea1be;
  --accent: #4fd1c5;
  --accent-soft: rgba(79, 209, 197, 0.2);
  --border: rgba(255, 255, 255, 0.08);
  --radius-md: 14px;
  --radius-lg: 20px;
  --sidebar-width: 296px;
  --sidebar-collapsed-width: 90px;
  /* One unified font across the whole app: Cairo. Fallbacks kept purely as
   * the safety net if the self-hosted file ever fails to load — not as a
   * visible flash. Both UI and AR vars resolve to the same stack. */
  --erp-font-ui: "Cairo", system-ui, sans-serif;
  --erp-font-ar: "Cairo", system-ui, sans-serif;
}

/* Global default - every element inherits Cairo unless it opts out.
 * Cairo is canonical across Arabic and Latin text. */
html, body, button, input, select, textarea {
  font-family: var(--erp-font-ar);
}

/* Belt-and-suspenders: force Cairo on every text element site-wide.
 * Overrides stray hardcoded stacks in legacy CSS. Icons are excluded. */
html body,
html body button,
html body input,
html body select,
html body textarea,
html body label,
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body p, html body span, html body a, html body div,
html body li, html body td, html body th {
  font-family: var(--erp-font-ar) !important;
}
html body i,
html body .bi,
html body [class*=" bi-"],
html body [class^="bi-"] { font-family: "bootstrap-icons" !important; }
html body code, html body pre, html body kbd, html body samp,
html body .mono, html body .font-monospace {
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--erp-font-ui);
  background: var(--bg-900);
  color: var(--text-100);
}

html[lang="ar"] body,
body[data-ui-language="ar"] {
  font-family: var(--erp-font-ar);
}

html[lang="ar"] body :is(code, pre, kbd, samp, .mono, .font-monospace),
body[data-ui-language="ar"] :is(code, pre, kbd, samp, .mono, .font-monospace) {
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

.erp-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.erp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  color: var(--text-200);
  font-size: 1.02rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.erp-nav-link i {
  font-size: 1.2rem;
  width: 1.35rem;
  text-align: center;
}

.erp-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-100);
  transform: translateX(2px);
}

.erp-nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(79, 209, 197, 0.25);
}

.erp-mobile-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.erp-mobile-brand-name {
  display: none;
  line-height: 1;
  white-space: nowrap;
}

.erp-toggle-logo {
  display: none;
  object-fit: contain;
  border: 0;
  background: transparent;
}

.erp-toggle-label {
  display: none;
}

.erp-mobile-search-btn {
  display: none;
}

.erp-user-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-200);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.erp-action-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-200);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.erp-action-button:hover {
  border-color: rgba(79, 209, 197, 0.6);
  color: var(--text-100);
}

.erp-notifications-link,
.erp-mobile-notifications-btn {
  position: relative;
}

.erp-notifications-link.active {
  border-color: rgba(79, 209, 197, 0.6);
  background: rgba(79, 209, 197, 0.1);
  color: #0f766e;
}

.erp-toast {
  border-radius: 12px;
  border: 1px solid rgba(79, 209, 197, 0.35);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
  padding: 0.7rem 0.8rem;
}

.erp-toast strong {
  display: block;
  font-size: 0.9rem;
}

.erp-toast p {
  margin: 0.3rem 0 0;
  color: var(--text-200);
  font-size: 0.85rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.page-header {
  margin-bottom: 0.8rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.page-header p {
  margin: 0.2rem 0 0;
  color: var(--text-300);
  font-size: 0.76rem;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem;
}

.control-actions-grid {
  margin-bottom: 0.8rem;
}

.control-panel-alert {
  margin-bottom: 1rem;
}

.module-card {
  background: linear-gradient(145deg, rgba(32, 42, 54, 0.92), rgba(18, 25, 34, 0.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.68rem;
  display: flex;
  gap: 0.62rem;
  min-height: 96px;
  align-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.module-card-button {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.module-card-button:focus-visible {
  outline: 2px solid rgba(79, 209, 197, 0.75);
  outline-offset: 2px;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 209, 197, 0.55);
}

.module-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(79, 209, 197, 0.16);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.module-card h2 {
  margin: 0;
  font-size: 0.82rem;
}

.module-card p {
  margin: 0.25rem 0 0;
  color: var(--text-300);
  font-size: 0.68rem;
}

.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 1rem;
}

.kpi-card,
.placeholder-panel {
  background: linear-gradient(145deg, rgba(30, 39, 51, 0.9), rgba(16, 23, 32, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.72rem;
}

.kpi-card small {
  color: var(--text-300);
}

.kpi-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.35rem;
}

.placeholder-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.scanner-shell {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
}

.scanner-card,
.scanner-result-card {
  background: linear-gradient(145deg, rgba(30, 39, 51, 0.9), rgba(16, 23, 32, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.scanner-preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  min-height: 300px;
}

#qrVideo {
  width: 100%;
  height: clamp(280px, 52vh, 520px);
  object-fit: cover;
  display: block;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanner-overlay::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(65vw, 300px);
  height: min(65vw, 300px);
  transform: translate(-50%, -50%);
  border: 3px solid rgba(79, 209, 197, 0.9);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.33);
}

.scanner-controls {
  margin-top: 0.9rem;
}

.scanner-status {
  color: var(--text-200);
  font-size: 0.95rem;
}

.scanner-result-card h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.scanner-result-value {
  min-height: 88px;
  border: 1px dashed rgba(79, 209, 197, 0.35);
  border-radius: 10px;
  padding: 0.8rem;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.22);
}

.module-page h1 {
  margin-top: 0;
  font-size: 2rem;
}

.module-page h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.monitoring-panel,
.printers-panel {
  overflow: hidden;
}

.settings-panel {
  overflow: hidden;
}

.settings-hero {
  margin-bottom: 1.1rem;
}

.settings-hero h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.settings-hero p {
  margin: 0.35rem 0 0;
  font-size: 0.83rem;
  color: var(--text-300);
}

.settings-tabs {
  gap: 0.55rem;
}

.settings-tabs .nav-link {
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-200);
  padding: 0.35rem 0.95rem;
  font-weight: 600;
}

.settings-tabs .nav-link.active {
  background: rgba(79, 209, 197, 0.2);
  border-color: rgba(79, 209, 197, 0.4);
  color: var(--text-100);
}

.settings-tab-pane .table {
  margin-top: 0.35rem;
}

.settings-top-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.settings-strip-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.56rem 0.65rem;
  display: grid;
  gap: 0.22rem;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.settings-strip-item strong {
  font-size: 0.72rem;
  line-height: 1.15;
}

.settings-strip-item small {
  font-size: 0.6rem;
  color: var(--text-300);
}

.settings-strip-item:hover {
  transform: translateY(-1px);
}

.settings-strip-item.active {
  border-color: rgba(79, 209, 197, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.settings-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.settings-panel-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7rem;
}

.settings-panel-card h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.settings-panel-card p {
  margin: 0.45rem 0 0;
  color: var(--text-300);
  font-size: 0.68rem;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.settings-section-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.settings-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  margin: 0;
}

.settings-kv-grid.compact {
  gap: 0.38rem 0.6rem;
}

.settings-kv-grid div {
  margin: 0;
}

.settings-kv-grid dt {
  margin: 0;
  font-size: 0.62rem;
  color: var(--text-300);
  font-weight: 600;
}

.settings-kv-grid dd {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  color: var(--text-100);
  font-weight: 600;
}

.settings-state {
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  font-size: 0.58rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.settings-state.ok {
  background: rgba(16, 185, 129, 0.14);
  color: #0f766e;
  border-color: rgba(16, 185, 129, 0.25);
}

.settings-state.warn {
  background: rgba(245, 158, 11, 0.16);
  color: #8a5a00;
  border-color: rgba(245, 158, 11, 0.28);
}

.settings-state.neutral {
  background: rgba(148, 163, 184, 0.18);
  color: #3a3a3a;
  border-color: rgba(148, 163, 184, 0.3);
}

.settings-inline-note {
  color: var(--text-300);
  font-size: 0.65rem;
  font-weight: 600;
}

.settings-empty-state {
  text-align: center;
}

.settings-unified-page {
  max-width: 1200px;
}

.settings-unified-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.settings-unified-head h1 {
  margin: 0;
  font-size: 1.22rem;
}

.settings-unified-head p {
  margin: 0.3rem 0 0;
  color: var(--text-300);
  font-size: 0.76rem;
}

.settings-unified-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.settings-unified-strip.settings-unified-strip-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-unified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 12px;
  align-items: start;
  width: 100%;
}

.settings-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.settings-panel-card.settings-form-card,
.settings-panel-card.settings-list-card {
  border-radius: 14px;
  padding: 0.78rem;
}

.settings-inline-grid {
  display: grid;
  gap: 0.55rem;
}

.settings-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.settings-color-input.form-control-color {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  padding: 0.22rem 0.3rem;
}

.settings-inline-grid label {
  display: grid;
  gap: 0.35rem;
}

.settings-inline-grid label > span {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 600;
}

.settings-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
}

.settings-check-row .form-check-input {
  margin-top: 0;
}

.settings-check-row > span {
  color: var(--dash-text);
  font-size: 0.7rem;
  font-weight: 600;
}

.settings-action-row {
  display: flex;
  justify-content: flex-end;
}

/* ---- Settings: Appearance section ---- */
.settings-appearance-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-appearance-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-appearance-label {
  font-weight: 600;
  font-size: .85rem;
  color: var(--pm-text-muted, #8a9cc0);
}
.settings-mode-toggle {
  display: flex;
  gap: 8px;
}
.settings-mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--pm-border, #2d3748);
  border-radius: 10px;
  background: var(--pm-card-bg, #1a1f2e);
  color: var(--pm-text, #c8d6e5);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 120px;
  justify-content: center;
}
.settings-mode-btn i {
  font-size: 1.1rem;
}
.settings-mode-btn:hover {
  border-color: var(--pm-accent, #6366f1);
  background: var(--pm-hover, #232940);
}
.settings-mode-btn.active {
  border-color: var(--pm-accent, #6366f1);
  background: var(--pm-accent, #6366f1);
  color: #fff;
}
.settings-color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid var(--pm-border, #2d3748);
  border-radius: 10px;
  background: var(--pm-card-bg, #1a1f2e);
  cursor: pointer;
  transition: all .2s ease;
  min-width: 80px;
}
.settings-color-swatch:hover {
  border-color: var(--pm-accent, #6366f1);
}
.settings-color-swatch.active {
  border-color: var(--pm-accent, #6366f1);
  box-shadow: 0 0 0 2px rgba(99,102,241,.3);
}
.settings-color-swatch .swatch-fill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
}
.settings-color-swatch .swatch-label {
  font-size: .75rem;
  color: var(--pm-text-muted, #8a9cc0);
}
.settings-color-swatch[data-ds-color="indigo"] .swatch-fill { background: #6366f1 !important; }
.settings-color-swatch[data-ds-color="teal"] .swatch-fill   { background: #14b8a6 !important; }
.settings-color-swatch[data-ds-color="amber"] .swatch-fill  { background: #f59e0b !important; }
.settings-color-swatch[data-ds-color="violet"] .swatch-fill { background: #8b5cf6 !important; }
/* Ensure swatch fills always show their color */
.settings-color-swatch .swatch-fill {
  box-shadow: none !important;
  border: none !important;
}

.settings-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.settings-card-top h3,
.settings-form-card h3,
.settings-list-card h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.settings-modern-table {
  margin-bottom: 0;
}

.settings-modern-table thead th {
  border-bottom-color: var(--dash-line);
  color: var(--dash-muted);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.settings-modern-table td {
  border-color: #edf0f6;
  font-size: 0.68rem;
  vertical-align: middle;
}
body.settings-reference-mode .module-page.settings-reference-page,
body.settings-reference-mode .module-page.inventory-odoo-page.settings-reference-page {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}
/* Tiny safety gutter only on very small phones so card edges don't kiss the
 * viewport. Desktops, tablets and normal phones stay fully edge-to-edge. */
@media (max-width: 480px) {
  body.settings-reference-mode .module-page.settings-reference-page,
  body.settings-reference-mode .module-page.inventory-odoo-page.settings-reference-page {
    padding-inline: 6px !important;
  }
}

/* =============================================================================
   WINDOW CONTROLS OVERLAY (PWA) � merge native Windows title bar into the ERP
   top bar. When the app is installed as a PWA and Chrome is running with the
   "window-controls-overlay" display mode, the native title bar is gone and the
   min/max/close buttons are overlaid in the top-right corner of the content.
   We do two things:
     1. Make the ERP top bar draggable so the user can still move the window.
     2. Reserve space on the top-right for the native window controls so the
        brand/icons don't sit underneath them.
   We use env(titlebar-area-*) vars to know exactly where the system buttons
   are. Fallbacks keep everything working on normal browsers / non-PWA views.
   ============================================================================= */
/* 2. Settings head (title + subtitle) � full width card */
body.settings-reference-mode .settings-reference-page .settings-unified-head {
  width: 100%;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.6vw, 20px) !important;
  margin-bottom: 10px;
}
.settings-unified-head-title {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 800;
}
.settings-unified-head-sub {
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  color: var(--pm-text-muted, #62779d);
}

/* 3. Tab strip � flex-wrap, not scroll. Tabs grow to share remaining width. */
body.settings-reference-mode .settings-reference-page .settings-top-strip.settings-unified-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 4px !important;
  padding: 6px !important;
  overflow: visible !important;
  width: 100%;
  margin-bottom: 10px;
}

body.settings-reference-mode .settings-reference-page .settings-strip-item {
  flex: 1 1 120px !important;
  min-width: 110px !important;
  min-height: 44px !important;
  padding: 0.55rem 0.75rem !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  text-align: center !important;
  justify-content: center !important;
  white-space: nowrap;
}

body.settings-reference-mode .settings-reference-page .settings-strip-item + .settings-strip-item {
  border-inline-start: 1px solid transparent !important;
}

body.settings-reference-mode .settings-reference-page .settings-strip-item.active {
  background: var(--odoo-primary-soft, rgba(135,90,123,.12)) !important;
  color: var(--odoo-primary, #875a7b) !important;
  box-shadow: inset 0 -2px 0 var(--odoo-primary, #875a7b) !important;
}

/* 4. Toolbar row (title + inline form action) � flex-wrap, full width */
.settings-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1vw, 14px) clamp(10px, 1.2vw, 18px);
  width: 100%;
}

.settings-toolbar-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.settings-toolbar-title strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-toolbar-meta {
  font-size: 0.8rem;
  color: var(--pm-text-muted, #62779d);
}

.settings-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
}

.settings-field-auto {
  flex: 1 1 130px !important;
  min-width: 110px !important;
  width: auto !important;
}

.settings-field-narrow {
  flex: 0 1 90px !important;
  min-width: 80px !important;
  width: auto !important;
}

.settings-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 5. Routing row � field groups wrap naturally, label above select */
.settings-routing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 0 clamp(10px, 1.2vw, 18px) clamp(10px, 1vw, 14px);
  width: 100%;
}

.settings-routing-label {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 0;
}

.settings-routing-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 150px;
  min-width: 120px;
}

.settings-routing-field > span {
  font-size: 0.72rem;
  color: var(--pm-text-muted, #62779d);
  font-weight: 600;
}

.settings-routing-field select {
  width: 100%;
}

/* 6. Tab panes � full width */
.settings-tab-pane {
  width: 100%;
}

/* 7. Tables in tab panes � responsive, full width */
.settings-tab-pane .table-responsive {
  padding: 0 clamp(8px, 1.2vw, 18px) clamp(8px, 1.2vw, 14px);
  width: 100%;
}

/* 8. Mode toggle + color picker � stretch on narrow */
@media (max-width: 575.98px) {
  .settings-mode-toggle,
  .settings-color-picker {
    width: 100%;
  }
  .settings-mode-btn,
  .settings-color-swatch {
    flex: 1 1 0;
    min-width: 0 !important;
  }
}

/* 9. Very narrow � hide small tab counts to save space */
@media (max-width: 420px) {
  body.settings-reference-mode .settings-reference-page .settings-strip-item small {
    display: none !important;
  }
  body.settings-reference-mode .settings-reference-page .settings-strip-item {
    flex: 1 1 90px !important;
    min-width: 80px !important;
    padding: 0.5rem 0.55rem !important;
  }
}

.settings-mini-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.settings-mini-actions form {
  margin: 0;
}

.settings-compact-table {
  margin: 0;
}

.settings-compact-table th,
.settings-compact-table td {
  vertical-align: middle;
}

.settings-compact-table td {
  font-size: 0.74rem;
}

.settings-col-group {
  width: 60px;
}

.settings-col-updated {
  width: 140px;
}

.settings-col-actions {
  width: 180px;
  text-align: center;
}

.settings-code-cell {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
}

.settings-muted-cell {
  color: var(--dash-muted);
  font-size: 0.72rem;
}

.settings-badge-micro {
  font-size: 0.68rem;
}

.settings-status-badge {
  font-size: 0.68rem;
}

.settings-mini-btn {
  font-size: 0.7rem;
  padding: 2px 6px;
}

.settings-edit-row {
  background: var(--bs-warning-bg-subtle, #fff8e1);
}

.settings-inline-form-compact {
  padding: 4px 0;
}

.settings-muted {
  color: var(--dash-muted);
  font-size: 0.63rem;
  margin-top: 0.12rem;
}

.settings-empty-note {
  color: var(--dash-muted);
  font-size: 0.72rem;
  margin: 0;
  text-align: center;
}

.settings-top-gap {
  margin-top: 0.85rem;
}

.inventory-modern-page {
  max-width: 1200px;
}

.inventory-modern-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.inventory-modern-head h1 {
  margin: 0;
  font-size: 1.22rem;
}

.inventory-modern-head p {
  margin: 0.3rem 0 0;
  color: var(--text-300);
  font-size: 0.76rem;
}

.inventory-banner-grid {
  display: grid;
  gap: 0.65rem;
}

.inventory-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.65rem;
}

.inventory-main-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-banner {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
}

.inventory-kpi-banner {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 0.2rem;
}

.inventory-kpi-banner small {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 700;
}

.inventory-kpi-banner strong {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-100);
}

.inventory-kpi-banner span {
  font-size: 0.68rem;
  color: var(--text-300);
}

.inventory-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.inventory-form-banner h3,
.inventory-table-banner h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.inventory-form-grid {
  display: grid;
  gap: 0.55rem;
}

.inventory-form-grid label {
  display: grid;
  gap: 0.35rem;
}

.inventory-form-grid label > span {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 600;
}

.inventory-check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
}

.inventory-check-row .form-check-input {
  margin-top: 0;
}

.inventory-check-row > span {
  color: var(--text-100);
  font-size: 0.7rem;
  font-weight: 600;
}

.inventory-actions {
  display: flex;
  justify-content: flex-end;
}

.inventory-inline-note {
  margin: 0.2rem 0 0.6rem;
  color: var(--text-300);
  font-size: 0.66rem;
  font-weight: 600;
}

.inventory-field-hint {
  color: var(--text-300);
  font-size: 0.64rem;
  font-weight: 600;
}

.inventory-uom-display {
  margin-bottom: 0;
}

.inventory-table-banner .table-responsive {
  max-height: 300px;
  overflow: auto;
}

.inventory-modern-table {
  margin-bottom: 0;
}

.inventory-modern-table thead th {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: var(--text-300);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.inventory-modern-table td {
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  vertical-align: middle;
}

.inventory-empty-note {
  color: var(--text-300);
  font-size: 0.72rem;
  margin: 0;
  text-align: center;
}

.module-base-page {
  width: 100%;
}

.module-base-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.module-base-head h1 {
  margin: 0;
}

.module-base-head p {
  margin: 0.35rem 0 0;
}

.module-base-panel {
  border-radius: 14px;
}

.inventory-ops-bar,
.module-base-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 0.34rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.1rem;
}

.inventory-ops-bar-sticky,
.module-base-nav-sticky {
  position: sticky;
  top: 0.65rem;
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.95);
  padding: 0.24rem 0.28rem;
}

.inventory-op-btn,
.module-base-nav-btn {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: transparent;
  color: var(--text-200);
  font-size: 0.66rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex: 0 0 auto;
  width: auto;
  gap: 0.3rem;
  padding: 0.38rem 0.65rem;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.inventory-op-btn:hover,
.module-base-nav-btn:hover {
  color: var(--text-100);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.inventory-op-btn.is-active,
.module-base-nav-btn.is-active {
  background: #f4c542;
  border-color: #dfb73f;
  color: #262626;
}

.inventory-ops-bar::-webkit-scrollbar,
.module-base-nav::-webkit-scrollbar {
  height: 6px;
}

.inventory-ops-bar::-webkit-scrollbar-thumb,
.module-base-nav::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.35);
  border-radius: 999px;
}

@media (max-width: 992px) {
  .inventory-ops-bar-sticky,
  .module-base-nav-sticky {
    position: sticky;
    top: 3.9rem;
    z-index: 1015;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
}

.items-page {
  max-width: 1200px;
}

.users-page {
  max-width: 1200px;
}

.users-kpi-grid {
  margin-bottom: 0.7rem;
}

.users-table-panel .table-responsive {
  max-height: 520px;
  overflow: auto;
}

.users-form-panel {
  padding: 0.7rem;
}

.users-form-grid {
  display: grid;
  gap: 0.7rem;
}

.users-form-main-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
}

.users-section-card {
  padding: 0.7rem;
}

.users-field {
  display: grid;
  gap: 0.34rem;
}

.users-field > span {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 600;
}

.users-inline-note {
  margin-top: 0;
}

.users-permissions-card {
  min-height: 100%;
}

.users-permission-groups {
  display: grid;
  gap: 0.6rem;
}

.users-permission-group {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.55rem 0.6rem;
}

.users-permission-group h4 {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.users-permission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
}

.users-check-row {
  align-items: flex-start;
  min-height: 28px;
}

.users-check-row > span {
  font-size: 0.68rem;
  line-height: 1.3;
}

.items-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.items-filter-panel {
  padding: 0.65rem;
  margin-bottom: 0.7rem;
}

.items-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.stock-balance-filter-form {
  grid-template-columns: minmax(0, 1.2fr) minmax(190px, 0.6fr) minmax(190px, 0.6fr) auto;
}

.items-filter-form label {
  display: grid;
  gap: 0.35rem;
}

.items-filter-form label > span {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 600;
}

.items-filter-actions {
  display: inline-flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.items-table {
  margin-bottom: 0;
}

.items-table thead th {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: var(--text-300);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.items-table td {
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  vertical-align: middle;
}

.items-empty {
  text-align: center;
  color: var(--text-300);
  font-size: 0.74rem;
}

.items-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.items-action-group form {
  margin: 0;
}

.items-action-btn {
  min-height: 36px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.inventory-toggle-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.inventory-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0 0.48rem 0 0.42rem;
  cursor: pointer;
  user-select: none;
}

.inventory-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.inventory-toggle-switch {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(100, 116, 139, 0.45);
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.inventory-toggle-switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateY(-50%);
  transition: transform 0.16s ease;
}

.inventory-toggle-input:checked + .inventory-toggle-switch {
  border-color: rgba(244, 197, 66, 0.9);
  background: rgba(244, 197, 66, 0.78);
}

.inventory-toggle-input:checked + .inventory-toggle-switch::after {
  transform: translate(17px, -50%);
}

.inventory-toggle-input:focus-visible + .inventory-toggle-switch {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.inventory-toggle-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-200);
  letter-spacing: 0.01em;
}

.items-form-page {
  max-width: 680px;
}

.items-uom-display {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.items-uom-display span {
  font-size: 0.68rem;
  color: var(--text-300);
  font-weight: 600;
}

.items-uom-display strong {
  font-size: 0.8rem;
  color: var(--text-100);
}

.stock-page {
  max-width: 1040px;
  margin: 0 auto;
}

.stock-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stock-panel {
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
}

.goods-receipt-banner {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(130deg, rgba(79, 209, 197, 0.14), rgba(79, 209, 197, 0.04)),
    rgba(7, 12, 20, 0.5);
  margin-bottom: 0.6rem;
}

.goods-receipt-banner-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(79, 209, 197, 0.38);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--accent);
}

.goods-receipt-banner h1 {
  margin: 0;
  font-size: 1.05rem;
}

.goods-receipt-banner p {
  margin: 0;
  color: var(--text-300);
  font-size: 0.76rem;
}

.stock-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.stock-section-head h2 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.stock-section-head span {
  font-size: 0.66rem;
  color: var(--text-300);
}

.stock-receive-form {
  display: grid;
  gap: 0.5rem;
}

.stock-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.75fr);
  gap: 0.5rem;
}

.stock-form-grid label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.stock-form-grid label > span {
  font-size: 0.64rem;
  color: var(--text-300);
  font-weight: 700;
}

.stock-notes-input {
  resize: none;
  min-height: 76px;
  max-height: 76px;
}

.stock-date-input {
  min-height: 76px;
  max-height: 76px;
  font-size: 0.82rem;
  font-weight: 600;
}

.stock-item-select,
.stock-qty-input {
  min-height: 38px;
  font-size: 0.78rem;
  border-radius: 10px;
}

.stock-lines-wrap {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.12rem;
}

.stock-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stock-lines-head h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.stock-add-line-btn,
.stock-remove-btn,
.stock-confirm-btn {
  min-height: 32px;
  border-radius: 10px;
  font-size: 0.64rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.stock-lines-table,
.stock-receipts-table {
  margin-bottom: 0;
}

.stock-lines-table {
  table-layout: fixed;
}

.stock-lines-table thead th,
.stock-receipts-table thead th {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: var(--text-300);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.55rem;
}

.stock-lines-table td,
.stock-receipts-table td {
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  vertical-align: middle;
  padding: 0.45rem 0.55rem;
}

.stock-col-item {
  width: 58%;
}

.stock-col-qty {
  width: 24%;
}

.stock-col-action {
  width: 18%;
}

.stock-col-action .stock-remove-btn {
  width: 100%;
  justify-content: center;
}

.stock-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.1rem;
}

.stock-submit-row .stock-confirm-btn {
  min-width: 186px;
  justify-content: center;
}

.workorders-page {
  max-width: 1160px;
}

.workorders-table {
  margin-bottom: 0;
}

.workorders-table thead th {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: var(--text-300);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.workorders-table td {
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  vertical-align: middle;
}

.workorder-form-page {
  max-width: 760px;
}

.workorder-create-form {
  display: grid;
  gap: 0.75rem;
}

.workorders-create-btn {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.workorders-create-btn-main {
  min-width: 200px;
  justify-content: center;
}

.workorder-submit-row {
  display: flex;
  justify-content: flex-end;
}

.workorders-info-btn {
  min-height: 32px;
  border-radius: 9px;
  font-size: 0.66rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.workorder-notes-editor,
.workorder-image-editor {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.workorder-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workorder-notes-list {
  display: grid;
  gap: 0.45rem;
}

.workorder-note-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.workorder-note-prefix {
  width: 28px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-muted);
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workorder-remove-note-btn {
  min-height: 34px;
  border-radius: 9px;
}

.workorder-image-preview {
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  min-height: 180px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem;
  display: grid;
  place-items: center;
  gap: 0.45rem;
}

.workorder-image-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
}

.workorder-image-preview small {
  color: var(--dash-muted);
  font-size: 0.66rem;
  font-weight: 600;
}

.workorder-image-preview-empty {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  color: var(--dash-muted);
  font-size: 0.74rem;
}

.workorder-image-preview-empty i {
  font-size: 1.3rem;
}

.workorder-info-page {
  max-width: 1440px;
}

.workorder-info-card {
  padding: 0.75rem;
}

.workorder-info-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.7rem;
  align-items: stretch;
}

.workorder-info-main,
.workorder-info-image-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7rem;
  display: grid;
  gap: 0.65rem;
}

.workorder-info-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.workorder-info-meta-grid div {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem 0.55rem;
  display: grid;
  gap: 0.2rem;
}

.workorder-info-meta-grid span {
  color: var(--dash-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.workorder-info-meta-grid strong {
  color: var(--dash-text);
  font-size: 0.84rem;
}

.workorder-info-notes-block h2,
.workorder-info-image-block h2 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--dash-text);
}

.workorder-note-tag-list {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.workorder-note-tag {
  border: 1px solid rgba(52, 211, 153, 0.36);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #b7ffe8;
  min-height: 32px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.workorder-note-empty {
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dash-muted);
  font-size: 0.74rem;
  padding: 0.8rem;
}

.workorder-image-frame {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.45rem;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.workorder-image-frame img {
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: contain;
  border-radius: 10px;
}

.workorder-info-image-block small {
  color: var(--dash-muted);
  font-size: 0.69rem;
}

.workorder-image-empty {
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  color: var(--dash-muted);
  font-size: 0.78rem;
  text-align: center;
}

.workorder-image-empty i {
  font-size: 1.45rem;
}

.workorder-info-canvas-page {
  max-width: 100%;
  padding-top: 0.2rem;
  display: grid;
  gap: 0.42rem;
}

.workorder-canvas-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
}

.workorder-canvas-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workorder-canvas-info-frame {
  width: 100%;
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
  padding: 0.5rem 0.62rem;
  display: grid;
  gap: 0.33rem;
}

.workorder-canvas-line {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
  min-width: 0;
}

.workorder-canvas-line-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.workorder-canvas-headline {
  color: #111111;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workorder-canvas-line-main .workorder-canvas-headline:first-child::after {
  content: " | ";
  color: #525252;
  font-weight: 700;
  margin-inline-start: 0.22rem;
}

.workorder-canvas-line-meta {
  min-height: 27px;
}

.workorder-canvas-plain-id {
  color: #111111;
  font-size: 0.72rem;
  font-weight: 700;
  margin-inline-end: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.workorder-canvas-stage {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 234px);
  border: 1px solid var(--dash-line);
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
}

.workorder-canvas-image {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 234px);
  object-fit: contain;
  background: #141414;
}

.workorder-canvas-empty {
  width: 100%;
  min-height: calc(100vh - 234px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  color: #b9c2d2;
  text-align: center;
}

.workorder-canvas-empty i {
  font-size: 2rem;
}

.workorder-canvas-empty strong {
  font-size: 1rem;
}

.workorder-canvas-empty span {
  font-size: 0.76rem;
}

.workorder-canvas-chip {
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  color: #111111;
  min-height: 26px;
  padding: 0 0.62rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workorder-canvas-chip-wo {
  border-color: rgba(59, 130, 246, 0.52);
  background: rgba(191, 219, 254, 0.95);
  color: #111111;
}

.workorder-canvas-note-tag {
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 999px;
  background: rgba(209, 250, 229, 0.92);
  color: #111111;
  min-height: 26px;
  padding: 0 0.62rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workorder-canvas-note-tag-empty {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(226, 232, 240, 0.85);
  color: #111111;
}

.warehouse-page {
  max-width: 1280px;
}

.warehouse-order-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.warehouse-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.warehouse-order-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.warehouse-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.warehouse-order-head strong {
  font-size: 0.84rem;
}

.warehouse-status-badge {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.warehouse-order-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.warehouse-order-meta div {
  display: grid;
  gap: 0.15rem;
}

.warehouse-order-meta span {
  font-size: 0.66rem;
  color: var(--text-300);
  font-weight: 600;
}

.warehouse-order-meta strong {
  font-size: 0.78rem;
}

.warehouse-shortage-note {
  margin: 0;
  border: 1px solid rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.08);
  color: #ff9ea8;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.warehouse-order-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.warehouse-btn {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.warehouse-order-table {
  margin-bottom: 0;
}

.warehouse-order-table thead th {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: var(--text-300);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.warehouse-order-table td {
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  vertical-align: middle;
}

.warehouse-shortage-cell {
  color: #ff9ea8 !important;
  font-weight: 800;
}

.warehouse-confirm-row {
  margin-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
}

.warehouse-confirm-btn {
  min-height: 52px;
  min-width: 260px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.is-hidden {
  display: none !important;
}

.sheet-sizes-page {
  max-width: 1040px;
}

.sheet-sizes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sheet-sizes-head h1 {
  margin: 0;
  font-size: 1.22rem;
}

.sheet-sizes-head p {
  margin: 0.35rem 0 0;
  color: var(--dash-muted);
  font-size: 0.76rem;
}

.sheet-sizes-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 36px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
}

.sheet-sizes-panel {
  padding: 0.7rem;
}

.sheet-size-form-page {
  max-width: 640px;
}

.sheet-size-form-page.items-form-page {
  max-width: 1040px;
}

.sheet-size-form-card {
  padding: 0.7rem;
}

.sheet-size-form-card .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dash-text);
}

.sheet-size-form-card .form-control-lg {
  min-height: 46px;
  font-size: 0.78rem;
}

.sheet-size-form-card .form-switch .form-check-input {
  width: 3rem;
  height: 1.5rem;
}

.sheet-size-form-card .form-check-label {
  font-size: 0.74rem;
  font-weight: 600;
}

.sheet-size-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.sheet-sizes-empty {
  text-align: center;
  padding: 1.6rem 0.7rem;
}

.sheet-sizes-empty strong {
  display: block;
  font-size: 0.85rem;
}

.sheet-sizes-empty p {
  margin: 0.42rem 0 0;
  color: var(--dash-muted);
  font-size: 0.72rem;
}

.sheet-sizes-grid {
  display: grid;
  gap: 0.7rem;
}

.sheet-size-card {
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.sheet-size-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sheet-size-meta h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dash-text);
}

.sheet-size-meta .badge {
  font-size: 0.62rem;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
}

.sheet-size-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sheet-size-actions form {
  margin: 0;
}

.control-operations-panel {
  margin-top: 1rem;
}

.monitoring-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.9rem;
  background: rgba(6, 12, 16, 0.45);
}

.monitoring-summary span {
  color: var(--text-300);
}

.monitoring-summary strong {
  font-size: 1.35rem;
  color: var(--accent);
}

.coming-soon {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.upload-placeholder {
  border: 1px dashed rgba(79, 209, 197, 0.35);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.8rem 0;
  background: rgba(6, 12, 16, 0.55);
}

.upload-placeholder input,
.upload-placeholder button {
  width: 100%;
  margin-top: 0.75rem;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1000px 540px at -8% -12%, rgba(244, 197, 66, 0.24), rgba(244, 197, 66, 0) 60%),
    radial-gradient(950px 520px at 105% 4%, rgba(74, 74, 77, 0.18), rgba(74, 74, 77, 0) 58%),
    #f6f7fb;
  color: #262626;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 26px);
}

.auth-layout {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 420px);
  gap: 12px;
  align-items: stretch;
}

.auth-brand-panel {
  border: 1px solid #e5e7ef;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--bg-surface) 0%, var(--bg-muted) 72%);
  padding: clamp(16px, 2.2vw, 28px);
  display: grid;
  align-content: space-between;
  gap: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.auth-brand-top {
  display: grid;
  gap: 8px;
}

.auth-brand-panel h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  color: #262626;
  letter-spacing: 0.01em;
}

.auth-brand-panel p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  max-width: 44ch;
}

.auth-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.auth-highlights li {
  border: 1px solid #e5e7ef;
  border-radius: 12px;
  background: var(--bg-surface);
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #333333;
  font-size: 0.83rem;
  font-weight: 600;
}

.auth-highlights li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f4c542;
  box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.24);
  flex: 0 0 auto;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid #e5e7ef;
  border-radius: 22px;
  padding: clamp(16px, 2.2vw, 26px);
  background: var(--bg-surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
  display: grid;
  gap: 14px;
}

.auth-header {
  display: grid;
  gap: 6px;
}

.auth-badge {
  border: 1px solid #dfb73f;
  border-radius: 999px;
  background: #fff7d9;
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #7c5a0b;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-header h1,
.auth-header h2 {
  margin: 0;
  font-size: 1.42rem;
  color: #1a1a1a;
}

.auth-logo {
  width: 154px;
  height: 46px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  margin: 0;
}

.auth-header p {
  margin: 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 5px;
}

.auth-field .form-label {
  margin: 0;
  color: #6b7280;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-input.form-control {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #d1d7e2;
  background: var(--bg-surface);
  color: #262626;
  font-size: 0.94rem;
}

.auth-input.form-control:focus {
  border-color: #f4c542;
  box-shadow: 0 0 0 0.2rem rgba(244, 197, 66, 0.2);
}

.auth-remember {
  border: 1px solid #e5e7ef;
  border-radius: 12px;
  background: #f8f9fc;
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #333333;
  margin: 0;
}

.auth-remember .form-check-input {
  margin-top: 0;
}

.auth-error-summary {
  margin: 0;
  font-size: 0.8rem;
}

.auth-submit-btn {
  min-height: 44px;
  border: 1px solid #dfb73f;
  border-radius: 12px;
  background: #f4c542;
  color: #262626;
  font-size: 0.93rem;
  font-weight: 700;
}

.auth-submit-btn:hover {
  border-color: #d8b33d;
  background: #efbf35;
  color: #1a1a1a;
}

.install-app-button {
  min-height: 42px;
  border-radius: 12px;
  border-color: #cfd6e1;
  background: var(--bg-surface);
  color: #4b5563;
  font-weight: 600;
}

.install-app-button:hover {
  border-color: #bfc9d7;
  background: #f8fafd;
  color: #1a1a1a;
}

.auth-note {
  margin-top: 0;
  border: 1px solid #e5e7ef;
  border-radius: 12px;
  background: #f8f9fc;
  padding: 10px 12px;
  color: #6b7280;
}

.auth-note small {
  font-size: 0.72rem;
}

.auth-note code {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #eef1f6;
  color: #262626;
  padding: 1px 6px;
}

.auth-layout-single {
  width: min(460px, 100%);
  grid-template-columns: 1fr;
  justify-content: center;
}

.auth-login-card-single {
  width: min(460px, 100%);
  justify-self: center;
}

.auth-single-brand {
  display: grid;
  gap: 10px;
}

.auth-single-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-logo-compact {
  width: 124px;
  height: 36px;
}

.auth-single-brand-name {
  color: #525252;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.auth-header-single {
  gap: 8px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #7a8698;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-input.form-control {
  padding-inline-start: 42px;
  padding-inline-end: 14px;
}

.auth-inline-help {
  color: #6b6b6b;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.7;
}

.auth-card-actions {
  display: grid;
}

.auth-note strong {
  display: block;
  margin-bottom: 4px;
  color: #3a3a3a;
  font-size: 0.82rem;
}

.auth-note small {
  display: block;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    order: 2;
  }

  .auth-card {
    order: 1;
    width: min(520px, 100%);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 10px;
  }

  .auth-brand-panel,
  .auth-card {
    border-radius: 16px;
    padding: 14px;
  }

  .auth-highlights li {
    min-height: 38px;
    font-size: 0.79rem;
  }

  .auth-single-brand-row,
  .auth-header-single,
  .auth-inline-help,
  .auth-note {
    text-align: center;
  }

  .auth-single-brand-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .auth-logo-compact {
    width: 116px;
    height: 34px;
  }

  .auth-input.form-control {
    min-height: 46px;
    font-size: 16px;
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .settings-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pilot-dashboard {
  display: grid;
  gap: 16px;
  max-width: 1500px;
}

.pilot-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pilot-topline h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dash-text);
}

.pilot-date {
  color: var(--dash-muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pilot-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas:
    "kpi side"
    "main side";
  gap: 16px;
  align-items: start;
}

.pilot-kpi-row {
  grid-area: kpi;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pilot-kpi-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  min-height: 132px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}

.pilot-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--dash-text);
  font-size: 0.74rem;
  font-weight: 600;
}

.pilot-kpi-head i {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.pilot-kpi-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  color: var(--dash-text);
}

.pilot-kpi-card p {
  margin: 10px 0 0;
  color: var(--dash-muted);
  font-size: 0.66rem;
}

.pilot-kpi-highlight {
  background: linear-gradient(180deg, var(--dash-accent) 0%, var(--dash-accent-strong) 100%);
  border-color: var(--dash-accent-strong);
}

.pilot-kpi-highlight .pilot-kpi-head,
.pilot-kpi-highlight .pilot-kpi-card strong,
.pilot-kpi-highlight strong {
  color: #ffffff;
}

.pilot-kpi-highlight .pilot-kpi-head i {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.pilot-kpi-highlight p {
  color: rgba(255, 255, 255, 0.88);
}

.pilot-main-grid {
  grid-area: main;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pilot-side-stack {
  grid-area: side;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 16px;
}

.pilot-create-banner {
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-yellow-border);
  background: var(--dash-yellow);
  min-height: 70px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #262626;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}

.pilot-create-banner:hover {
  filter: brightness(0.98);
  color: #1a1a1a;
}

.pilot-create-banner:active {
  transform: translateY(1px);
}

.pilot-panel {
  background: var(--dash-card);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}

.pilot-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.pilot-panel-head h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dash-text);
}

.pilot-panel-head span,
.pilot-panel-head a {
  color: var(--dash-muted);
  font-size: 0.66rem;
  font-weight: 600;
}

.pilot-search {
  position: relative;
  display: block;
  margin-bottom: 12px;
}

.pilot-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: #fbfcfe;
  color: var(--dash-text);
  padding: 0 40px 0 14px;
  font-size: 0.72rem;
  outline: none;
}

.pilot-search input::placeholder {
  color: #9ca3af;
}

.pilot-search i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.8rem;
  pointer-events: none;
}

.pilot-list {
  display: grid;
  gap: 10px;
}

.pilot-list-item {
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: var(--bg-surface);
  min-height: 66px;
  padding: 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.pilot-list-item > div {
  min-width: 0;
}

.pilot-list-item strong {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--dash-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pilot-list-item small {
  color: var(--dash-muted);
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pilot-badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--dash-accent);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pilot-badge.warn {
  background: var(--dash-yellow);
  color: #262626;
}

.pilot-state {
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.state-ready {
  color: #333333;
  background: #e5e7eb;
}

.state-progress {
  color: #8a5a00;
  background: #fae9b4;
}

.state-done {
  color: #333333;
  background: #e5e5e5;
}

.pilot-pay-btn {
  border: 1px solid var(--dash-yellow-border);
  background: var(--dash-yellow);
  color: #262626;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 0.72rem;
  font-size: 0.58rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pilot-pay-btn i {
  font-size: 0.6rem;
}

.pilot-popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pilot-popular-list li {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pilot-rank {
  font-size: 0.64rem;
  color: var(--dash-muted);
  font-weight: 700;
}

.pilot-dish-thumb {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--dash-line);
  display: inline-block;
}

.pilot-dish-thumb.dish-a {
  background: linear-gradient(145deg, #f3c363 0%, #c27a2e 100%);
}

.pilot-dish-thumb.dish-b {
  background: linear-gradient(145deg, #f49e61 0%, #b9502f 100%);
}

.pilot-dish-thumb.dish-c {
  background: linear-gradient(145deg, #f4d58d 0%, #d48f2a 100%);
}

.pilot-dish-thumb.dish-d {
  background: linear-gradient(145deg, #f2dfac 0%, #b9915b 100%);
}

.pilot-popular-list strong {
  font-size: 0.68rem;
  color: var(--dash-text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pilot-popular-list small {
  font-size: 0.58rem;
  color: var(--dash-muted);
}

.pilot-simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.pilot-simple-list li {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--dash-line);
  padding-bottom: 10px;
}

.pilot-simple-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pilot-simple-list strong {
  color: var(--dash-text);
  font-size: 0.68rem;
}

.pilot-simple-list small {
  color: var(--dash-muted);
  font-size: 0.58rem;
}

@media (max-width: 1400px) {
  .pilot-layout-grid {
    grid-template-columns: minmax(0, 1fr) 308px;
  }

  .pilot-topline h1 {
    font-size: 1.16rem;
  }

  .pilot-date {
    font-size: 0.68rem;
  }
}

@media (max-width: 1100px) {
  .settings-top-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-unified-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-split-grid {
    grid-template-columns: 1fr;
  }

  .users-form-main-grid {
    grid-template-columns: 1fr;
  }

  .users-permission-list {
    grid-template-columns: 1fr;
  }

  .inventory-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-kpi-grid .inventory-kpi-banner:last-child {
    grid-column: 1 / -1;
  }

  .inventory-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-ops-bar,
  .module-base-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .items-filter-form {
    grid-template-columns: 1fr;
  }

  .stock-balance-filter-form {
    grid-template-columns: 1fr;
  }

  .items-filter-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .items-filter-actions .sheet-sizes-btn {
    width: 100%;
  }

  .stock-form-grid {
    grid-template-columns: 1fr;
  }

  .stock-submit-row {
    justify-content: stretch;
  }

  .stock-submit-row .stock-confirm-btn {
    width: 100%;
    justify-content: center;
  }

  .workorder-submit-row {
    justify-content: stretch;
  }

  .workorder-submit-row .workorders-create-btn-main {
    width: 100%;
  }

  .workorder-note-row {
    grid-template-columns: 24px 1fr auto;
  }

  .workorder-info-grid,
  .workorder-info-meta-grid {
    grid-template-columns: 1fr;
  }

  .workorder-image-frame {
    min-height: 280px;
  }

  .workorder-canvas-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.42rem;
  }

  .workorder-canvas-info-frame {
    padding: 0.42rem 0.5rem;
    gap: 0.28rem;
  }

  .workorder-canvas-line-main {
    gap: 0.32rem;
  }

  .workorder-canvas-headline {
    font-size: 0.8rem;
  }

  .workorder-canvas-plain-id {
    font-size: 0.66rem;
    max-width: 280px;
  }

  .workorder-canvas-stage,
  .workorder-canvas-image,
  .workorder-canvas-empty {
    min-height: calc(100vh - 242px);
  }

  .workorder-canvas-chip,
  .workorder-canvas-note-tag {
    min-height: 24px;
    font-size: 0.58rem;
    padding: 0 0.52rem;
  }

  .warehouse-confirm-row {
    justify-content: stretch;
  }

  .warehouse-confirm-btn {
    width: 100%;
    min-width: 0;
  }

  .pilot-layout-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kpi"
      "main"
      "side";
  }

  .pilot-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "create create"
      "popular stock";
    grid-template-rows: auto;
  }

  .pilot-create-banner {
    grid-area: create;
  }

  .pilot-popular-panel {
    grid-area: popular;
  }

  .pilot-stock-panel {
    grid-area: stock;
  }
}

@media (max-width: 992px) {
  .pilot-topline h1 {
    font-size: 0.98rem;
  }

  .pilot-date {
    font-size: 0.62rem;
  }

  .pilot-kpi-row,
  .pilot-main-grid {
    grid-template-columns: 1fr;
  }

  .pilot-kpi-card strong {
    font-size: 1.25rem;
  }

  .pilot-side-stack {
    grid-template-columns: 1fr;
    grid-template-areas:
      "create"
      "popular"
      "stock";
  }
}

@media (max-width: 800px) {
  .settings-top-strip {
    grid-template-columns: 1fr;
  }

  .settings-unified-strip {
    grid-template-columns: 1fr;
  }

  .inventory-kpi-grid {
    grid-template-columns: 1fr;
  }

  .inventory-kpi-grid .inventory-kpi-banner:last-child {
    grid-column: auto;
  }

  .inventory-ops-bar,
  .module-base-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .inventory-main-grid {
    grid-template-columns: 1fr;
  }

  .items-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .items-head-actions .sheet-sizes-btn {
    width: 100%;
  }

  .stock-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-head-actions .sheet-sizes-btn {
    width: 100%;
  }

  .sheet-sizes-head .workorders-create-btn {
    width: 100%;
    justify-content: center;
  }

  .warehouse-order-meta {
    grid-template-columns: 1fr;
  }

  .warehouse-order-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .warehouse-order-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .warehouse-order-actions form,
  .warehouse-order-actions a,
  .warehouse-order-actions button {
    width: 100%;
    justify-content: center;
  }

  .items-action-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .items-action-group .items-action-btn,
  .items-action-group form,
  .items-action-group form button {
    width: 100%;
  }

  .items-action-group .inventory-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .stock-lines-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-lines-head .stock-add-line-btn {
    width: 100%;
    justify-content: center;
  }

  .stock-section-head {
    display: grid;
    gap: 0.2rem;
  }

  .stock-remove-btn {
    width: 100%;
    justify-content: center;
  }

  .sheet-size-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-size-actions form,
  .sheet-size-actions button,
  .sheet-size-actions .sheet-sizes-btn {
    width: 100%;
  }

  .sheet-size-actions .inventory-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .sheet-size-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-kv-grid {
    grid-template-columns: 1fr;
  }

  .notifications-head-actions {
    width: 100%;
  }

  .notifications-head-actions form,
  .notifications-head-actions button {
    width: 100%;
  }

  .notifications-summary-grid {
    grid-template-columns: 1fr;
  }

  .notifications-filter-form {
    grid-template-columns: 1fr;
  }

  .notifications-filter-form .notifications-filter-btn {
    width: 100%;
  }

  .notification-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-card-actions {
    justify-content: flex-start;
  }

  .reports-filter-form {
    grid-template-columns: 1fr;
  }

  .reports-btn {
    width: 100%;
  }

  .reports-kpi-grid {
    grid-template-columns: 1fr;
  }

  .reports-head {
    align-items: stretch;
  }

  .hr-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hr-forms-grid {
    grid-template-columns: 1fr;
  }

  .hr-panel-wide {
    grid-column: auto;
  }

  .hr-form-grid-wide {
    grid-template-columns: 1fr;
  }

  .hr-btn {
    width: 100%;
  }

  .pilot-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .pilot-topline h1 {
    font-size: 0.9rem;
  }

  .pilot-date {
    font-size: 0.56rem;
  }

  .pilot-layout-grid,
  .pilot-dashboard {
    gap: 12px;
  }

  .pilot-panel,
  .pilot-kpi-card {
    border-radius: 14px;
    padding: 12px;
  }

  .pilot-create-banner {
    min-height: 62px;
    font-size: 0.68rem;
  }

  .pilot-list-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    row-gap: 0;
    column-gap: 8px;
  }

  .pilot-order-list .pilot-list-item .pilot-state,
  .pilot-payment-list .pilot-list-item .pilot-pay-btn {
    grid-column: 3;
    justify-self: end;
    align-self: center;
  }

  .pilot-state,
  .pilot-pay-btn {
    white-space: nowrap;
  }
}

/* =====================================================================
   Notifications Center — Facebook-style redesign (RTL Arabic)
   ===================================================================== */

.notif-page {
  --notif-surface: #ffffff;
  --notif-border: #ebedf0;
  --notif-divider: #f0f2f5;
  --notif-text: #050505;
  --notif-text-soft: #606770;
  --notif-text-muted: #8a8d91;
  --notif-brand: #1877f2;
  --notif-brand-ink: #1554b3;
  --notif-unread-bg: #e7f3ff;
  --notif-hover: #f2f3f5;
  --notif-danger: #e41e3f;
  display: grid;
  gap: 12px;
  color: var(--notif-text);
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Topbar ---------- */
.notif-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--notif-divider);
}

.notif-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notif-topbar-title h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--notif-text);
  letter-spacing: -0.01em;
}

.notif-topbar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--notif-brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 20px;
}

.notif-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-inline-form { margin: 0; }

.notif-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--notif-hover);
  color: var(--notif-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.notif-iconbtn i { font-size: 1.05rem; line-height: 1; }
.notif-iconbtn:hover { background: #e4e6eb; }
.notif-iconbtn:active { transform: scale(.95); }
.notif-iconbtn-danger:hover { background: #ffecec; color: var(--notif-danger); }

/* ---------- Flash ---------- */
.notif-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid;
}
.notif-flash i { font-size: 1.1rem; line-height: 1; }
.notif-flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.notif-flash-info    { background: #e7f3ff; border-color: #bfdbfe; color: #1554b3; }
.notif-flash-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notif-flash-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---------- Filter chips ---------- */
.notif-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}

.notif-chip {
  --chip-accent: #606770;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--notif-text-soft);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.notif-chip i { font-size: .95rem; line-height: 1; }
.notif-chip:hover {
  background: #e4e6eb;
  color: var(--notif-text);
  text-decoration: none;
}
.notif-chip.is-active {
  background: var(--notif-brand);
  color: #fff;
  border-color: var(--notif-brand);
  box-shadow: 0 4px 10px -4px rgba(24,119,242,.45);
}
.notif-chip.is-active i { color: #fff; }

/* ---------- Search + toggle ---------- */
.notif-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 0 2px;
}

.notif-search-input {
  position: relative;
  display: flex;
  align-items: center;
  background: #f0f2f5;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  min-height: 40px;
  transition: border-color .15s ease, background .15s ease;
}
.notif-search-input:focus-within {
  background: #fff;
  border-color: var(--notif-brand);
  box-shadow: 0 0 0 3px rgba(24,119,242,.12);
}
.notif-search-input i {
  color: var(--notif-text-muted);
  font-size: 1.05rem;
  margin-inline-end: 8px;
}
.notif-search-input input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: .92rem;
  color: var(--notif-text);
  min-width: 0;
}
.notif-search-input input::placeholder { color: var(--notif-text-muted); }

.notif-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 40px;
  border-radius: 999px;
  background: #f0f2f5;
  cursor: pointer;
  font-size: .85rem;
  color: var(--notif-text-soft);
  font-weight: 500;
  user-select: none;
  position: relative;
}
.notif-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.notif-toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #bcc0c4;
  transition: background .2s ease;
  flex: 0 0 auto;
}
.notif-toggle-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.notif-toggle input:checked ~ .notif-toggle-track { background: var(--notif-brand); }
.notif-toggle input:checked ~ .notif-toggle-track .notif-toggle-dot { transform: translateX(-14px); }
.notif-toggle input:checked ~ span:last-child { color: var(--notif-brand-ink); font-weight: 600; }

/* ---------- Empty state ---------- */
.notif-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 48px 20px;
  background: var(--notif-surface);
  border-radius: 12px;
}
.notif-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0f2f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bcc0c4;
  font-size: 2rem;
  margin-bottom: 4px;
}
.notif-empty strong { font-size: 1.05rem; color: var(--notif-text); font-weight: 700; }
.notif-empty p { margin: 0; color: var(--notif-text-soft); font-size: .9rem; max-width: 320px; }

/* ---------- Section (date group) ---------- */
.notif-section { display: block; margin-bottom: 4px; }

.notif-section-title {
  margin: 10px 4px 6px;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--notif-text);
  letter-spacing: -0.01em;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  background: var(--notif-surface);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  isolation: isolate;
}
.notif-list > .notif-row:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.notif-list > .notif-row:last-child  { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* ---------- Row ---------- */
.notif-row {
  --notif-accent: #1877f2;
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--notif-surface);
  transition: background .12s ease;
  min-height: 76px;
}
.notif-row:hover { background: var(--notif-hover); }
.notif-row.is-unread { background: var(--notif-unread-bg); }
.notif-row.is-unread:hover { background: #d8eaff; }

.notif-row-surface {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  align-items: center;
}
a.notif-row-surface { cursor: pointer; }
a.notif-row-surface:hover { text-decoration: none; color: inherit; }

/* Avatar (circle) with a small type badge overlay */
.notif-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex: 0 0 auto;
  background: linear-gradient(135deg, color-mix(in srgb, var(--notif-accent) 85%, #000) 0%, var(--notif-accent) 100%);
  color: #fff;
  box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--notif-accent) 50%, transparent);
}
.notif-avatar > i { position: relative; z-index: 1; }

.notif-avatar-badge {
  position: absolute;
  bottom: -2px;
  inset-inline-start: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--notif-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  border: 2px solid var(--notif-surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.notif-row.is-unread .notif-avatar-badge { border-color: var(--notif-unread-bg); }
.notif-row:hover .notif-avatar-badge { border-color: var(--notif-hover); }
.notif-row.is-unread:hover .notif-avatar-badge { border-color: #d8eaff; }

.notif-row-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-row-text {
  margin: 0;
  font-size: .94rem;
  color: var(--notif-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-row-text strong {
  font-weight: 700;
  color: var(--notif-text);
}
.notif-row-sep { color: var(--notif-text-muted); margin: 0 2px; }
.notif-row-message { color: var(--notif-text); }

.notif-row.is-unread .notif-row-text strong { font-weight: 800; }

.notif-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: .8rem;
  color: var(--notif-text-soft);
}
.notif-row.is-unread .notif-row-meta { color: var(--notif-brand); font-weight: 600; }
.notif-row-meta time { color: inherit; }
.notif-row-meta .notif-row-type {
  color: var(--notif-text-muted);
  font-weight: 500;
}
.notif-row-meta .notif-row-type::before {
  content: '•';
  margin-inline-end: 8px;
  color: var(--notif-text-muted);
}

/* Blue unread dot on the end */
.notif-row-dot {
  align-self: center;
  margin-inline-start: 4px;
  margin-inline-end: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--notif-brand);
  flex: 0 0 auto;
}

/* 3-dot menu */
.notif-row-menu {
  position: relative;
  align-self: center;
  margin-inline-start: 4px;
  margin-inline-end: 8px;
}
.notif-row-menu summary {
  list-style: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--notif-text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.notif-row-menu summary::-webkit-details-marker { display: none; }
.notif-row-menu summary:hover { background: #e4e6eb; color: var(--notif-text); }
.notif-row-menu[open] summary { background: #e4e6eb; color: var(--notif-text); }
.notif-row-menu summary i { font-size: 1.05rem; line-height: 1; }

.notif-row-menu-sheet {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--notif-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  direction: rtl;
  animation: notifMenuIn .14s ease-out;
}

@keyframes notifMenuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.notif-row-menu-form { margin: 0; }

.notif-row-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--notif-text);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: inherit;
  font-family: inherit;
}
.notif-row-menu-item i { font-size: 1.05rem; line-height: 1; color: var(--notif-text-soft); }
.notif-row-menu-item:hover { background: var(--notif-hover); color: var(--notif-text); text-decoration: none; }
.notif-row-menu-item-danger { color: var(--notif-danger); }
.notif-row-menu-item-danger i { color: var(--notif-danger); }
.notif-row-menu-item-danger:hover { background: #fef2f2; color: var(--notif-danger); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .notif-topbar-title h1 { font-size: 1.25rem; }
  .notif-iconbtn { width: 34px; height: 34px; }
  .notif-search { grid-template-columns: 1fr; }
  .notif-toggle { justify-content: flex-start; }
  .notif-avatar { width: 48px; height: 48px; font-size: 1.4rem; }
  .notif-row-text { font-size: .88rem; }
  .notif-row-meta { font-size: .75rem; }
  .notif-row { min-height: 68px; }
  .notif-row-surface { padding: 10px 12px; gap: 10px; }
  .notif-row-menu-sheet { inset-inline-start: auto; inset-inline-end: 0; }
}

.reports-page {
  display: grid;
  gap: 12px;
}

.reports-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-head h1 {
  margin: 0;
  font-size: 1.2rem;
}

.reports-head p {
  margin: 0.28rem 0 0;
  color: #6b6b6b;
}

.reports-generated-at {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 8px 11px;
  display: grid;
  gap: 1px;
}

.reports-generated-at span {
  color: #6b7280;
  font-size: 0.72rem;
}

.reports-generated-at strong {
  color: #1a1a1a;
  font-size: 0.95rem;
}

.reports-panel {
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  background: var(--bg-surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.reports-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.reports-panel-head h2 {
  margin: 0;
  font-size: 1rem;
}

.reports-panel-head span {
  font-size: 0.74rem;
  color: #6b7280;
}

.reports-filter-form {
  display: grid;
  grid-template-columns: minmax(130px, 150px) minmax(180px, 1fr) minmax(120px, 140px) auto auto;
  gap: 8px;
  align-items: end;
}

.reports-filter-form label {
  display: grid;
  gap: 4px;
}

.reports-filter-form label > span {
  font-size: 0.74rem;
  color: #6b7280;
}

.reports-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reports-kpi-card {
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: var(--bg-surface);
  padding: 9px 11px;
  display: grid;
  gap: 2px;
}

.reports-kpi-card small {
  color: #6b7280;
  font-size: 0.72rem;
}

.reports-kpi-card strong {
  color: #1a1a1a;
  font-size: 1.14rem;
  line-height: 1.2;
}

.reports-kpi-card span {
  color: #6b6b6b;
  font-size: 0.72rem;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.reports-table thead th {
  font-size: 0.76rem;
  color: #525252;
  white-space: nowrap;
}

.reports-table tbody td {
  font-size: 0.8rem;
  vertical-align: middle;
}

.reports-empty-cell {
  text-align: center;
  color: #6b7280;
  padding: 18px 10px !important;
}

.reports-product-cell {
  display: grid;
  line-height: 1.2;
}

.reports-product-cell small {
  color: #6b7280;
  font-size: 0.72rem;
}

.hr-page {
  display: grid;
  gap: 12px;
}

.hr-head h1 {
  margin: 0;
  font-size: 1.2rem;
}

.hr-head p {
  margin: 0.3rem 0 0;
  color: #6b6b6b;
}

.hr-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-kpi-card {
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: var(--bg-surface);
  padding: 10px 11px;
  display: grid;
  gap: 2px;
}

.hr-kpi-card small {
  color: #6b6b6b;
  font-size: 0.72rem;
}

.hr-kpi-card strong {
  font-size: 1.12rem;
  line-height: 1.2;
  color: #1a1a1a;
}

.hr-kpi-card span {
  color: #6b6b6b;
  font-size: 0.72rem;
}

.hr-forms-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hr-panel {
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  background: var(--bg-surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.hr-panel-wide {
  grid-column: span 2;
}

.hr-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.hr-form-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.hr-form-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-form-grid label {
  display: grid;
  gap: 4px;
}

.hr-form-grid label > span {
  font-size: 0.74rem;
  color: #6b6b6b;
}

.hr-check-row {
  min-height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 0 10px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.hr-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hr-data-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.hr-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hr-panel-head span {
  color: #6b6b6b;
  font-size: 0.74rem;
}

.hr-table thead th {
  color: #525252;
  font-size: 0.75rem;
  white-space: nowrap;
}

.hr-table tbody td {
  font-size: 0.8rem;
  vertical-align: middle;
}

.hr-empty-cell {
  text-align: center;
  color: #6b7280;
  padding: 18px 10px !important;
}

.hr-lite-page {
  display: grid;
  gap: 10px;
}

.hr-lite-head h1 {
  margin: 0;
  font-size: 1.22rem;
}

.hr-lite-head p {
  margin: 0.25rem 0 0;
  color: #6b6b6b;
  font-size: 0.86rem;
}

.hr-nav-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hr-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd7e8;
  border-radius: 10px;
  background: var(--bg-surface);
  color: #203451;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.hr-nav-item:hover {
  border-color: #3e78e5;
  color: #1d4ed8;
}

.hr-nav-item.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.hr-lite-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.hr-lite-panel h2 {
  margin: 0;
  font-size: 0.98rem;
}

.hr-lite-form-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-lite-form-grid label {
  display: grid;
  gap: 4px;
}

.hr-lite-form-grid label > span {
  font-size: 0.72rem;
  color: #6b6b6b;
}

.hr-lite-form-full {
  grid-column: 1 / -1;
}

.hr-lite-check {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 0 10px;
  min-height: 36px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.hr-lite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-lite-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.hr-lite-search {
  display: flex;
  gap: 6px;
}

.hr-lite-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hr-lite-inline-actions form {
  margin: 0;
}

.hr-lite-table thead th {
  font-size: 0.73rem;
  color: #525252;
  white-space: nowrap;
}

.hr-lite-table tbody td {
  font-size: 0.8rem;
}

.hr-lite-empty {
  text-align: center;
  color: #6b7280;
  padding: 16px 10px !important;
}

.hr-lite-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hr-overview-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-overview-kpi {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.hr-overview-kpi small {
  color: #6b6b6b;
  font-size: 0.72rem;
}

.hr-overview-kpi strong {
  color: #1a1a1a;
  font-size: 1.1rem;
  line-height: 1.2;
}

.hr-overview-kpi span {
  color: #6b6b6b;
  font-size: 0.74rem;
}

.hr-overview-health-list {
  display: grid;
  gap: 6px;
}

.hr-overview-health-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.hr-overview-health-list span {
  color: #6b6b6b;
}

.hr-overview-health-list strong {
  color: #1a1a1a;
}

.hr-command-page {
  gap: 12px;
}

.hr-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hr-command-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  min-width: min(360px, 100%);
}

.hr-command-meta div {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.hr-command-meta small {
  color: #6b6b6b;
  font-size: 0.72rem;
}

.hr-command-meta strong {
  color: #1a1a1a;
  font-size: 0.86rem;
}

.hr-command-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-command-kpi {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-muted) 100%);
}

.hr-command-kpi small {
  color: #6b6b6b;
  font-size: 0.72rem;
  font-weight: 700;
}

.hr-command-kpi strong {
  color: #1a1a1a;
  font-size: 1.14rem;
}

.hr-command-kpi span {
  color: #525252;
  font-size: 0.74rem;
}

.hr-command-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hr-workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hr-workflow-card {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: var(--bg-surface);
  color: #262626;
  text-decoration: none;
  padding: 10px;
}

.hr-workflow-card strong {
  font-size: 0.84rem;
}

.hr-workflow-card span {
  font-size: 0.76rem;
  color: #6b6b6b;
}

.hr-workflow-card:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.14);
}

@media (max-width: 1100px) {
  .hr-lite-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-lite-split {
    grid-template-columns: 1fr;
  }

  .hr-overview-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-command-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-command-split {
    grid-template-columns: 1fr;
  }

  .hr-workflow-grid {
    grid-template-columns: 1fr;
  }

  .hr-command-head {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hr-lite-form-grid {
    grid-template-columns: 1fr;
  }

  .hr-lite-table-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hr-lite-search {
    width: 100%;
  }

  .hr-overview-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hr-command-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hr-command-meta {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.import-page {
  display: grid;
  gap: 12px;
  max-width: 1100px;
}

.import-head h1 {
  margin: 0;
  font-size: 1.2rem;
}

.import-head p {
  margin: 0.3rem 0 0;
  color: #6b7280;
}

.import-wizard-panel {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: var(--bg-surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.import-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-step {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f4f7fb;
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  gap: 1px;
}

.import-step span {
  font-size: 0.68rem;
  color: #6b6b6b;
  font-weight: 700;
}

.import-step strong {
  font-size: 0.8rem;
  color: #262626;
}

.import-step.active {
  border-color: #3b82f6;
  background: #3b82f6;
}

.import-step.active span,
.import-step.active strong {
  color: #ffffff;
}

.import-drop-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.import-drop-layout.import-drop-layout-single {
  grid-template-columns: 1fr;
}

.import-drop-block {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.import-drop-block h2 {
  margin: 0;
  font-size: 0.95rem;
}

.import-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.76rem;
}

.import-dropzone {
  border: 2px dashed #cccccc;
  border-radius: 14px;
  min-height: 190px;
  background: #f8fbff;
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.import-dropzone:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.import-dropzone.is-dragover {
  border-color: #3b82f6;
  background: #dbeafe;
  transform: translateY(-1px);
}

.import-dropzone-soft {
  background: #fbfdff;
}

.import-dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid #dbe3ef;
  background: var(--bg-surface);
  color: #6b6b6b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.import-dropzone strong {
  color: #1a1a1a;
  font-size: 1.05rem;
}

.import-dropzone span {
  color: #333333;
  font-size: 0.85rem;
}

.import-dropzone small {
  color: #6b7280;
  font-size: 0.72rem;
}

.import-file-list {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fafafa;
  padding: 8px 10px;
  color: #525252;
  font-size: 0.72rem;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.import-errors {
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
  padding: 10px;
}

.import-errors h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #991b1b;
}

.import-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.import-submit-btn,
.import-cancel-btn {
  min-height: 40px;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 992px) {
  .import-steps {
    grid-template-columns: 1fr;
  }

  .import-drop-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .import-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .import-submit-btn,
  .import-cancel-btn {
    width: 100%;
  }
}

@media (max-width: 992px) {
  .erp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .erp-header-title {
    font-size: 1rem;
  }

  .erp-header-actions {
    gap: 0.35rem;
  }

  .erp-action-button {
    padding: 0.4rem 0.55rem;
  }

  .erp-action-button span {
    display: none;
  }

  .scanner-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workorder-canvas-topbar {
    grid-template-columns: 1fr;
  }

  .workorder-canvas-back-btn {
    width: 100%;
    height: 38px;
  }

  .workorder-canvas-info-frame {
    padding: 0.34rem 0.42rem;
    border-radius: 10px;
  }

  .workorder-canvas-line-main {
    gap: 0.2rem;
  }

  .workorder-canvas-headline {
    font-size: 0.68rem;
    line-height: 1.08;
  }

  .workorder-canvas-line-main .workorder-canvas-headline:first-child::after {
    margin-inline-start: 0.12rem;
  }

  .workorder-canvas-plain-id {
    font-size: 0.6rem;
    max-width: 220px;
  }

  .workorder-canvas-stage,
  .workorder-canvas-image,
  .workorder-canvas-empty {
    min-height: calc(100vh - 286px);
    border-radius: 12px;
  }

  .workorder-canvas-chip,
  .workorder-canvas-note-tag {
    min-height: 22px;
    font-size: 0.54rem;
    padding: 0 0.46rem;
  }
}

/* Mobile/tablet table safety across modules */
@media (max-width: 992px) {
  .module-page .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .module-page .table-responsive > .table {
    min-width: 760px;
  }
}

@media (max-width: 576px) {
  .module-page .table-responsive > .table {
    min-width: 880px;
  }
}

@media (max-width: 768px) {
  .module-base-head {
    flex-direction: column;
    align-items: stretch !important;
  }

  .module-base-head .btn {
    width: 100%;
  }

  .settings-brand-grid {
    grid-template-columns: 1fr;
  }
}

/* Inventory UI v2 (Odoo-like layout, no logic changes) */
.inventory-odoo-page {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
}

.inventory-odoo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.inventory-odoo-header h1 {
  margin: 0;
  font-size: 1.36rem;
  font-weight: 700;
}

.inventory-odoo-header p {
  margin: 0.34rem 0 0;
  color: #6b7280;
  font-size: 0.92rem;
  max-width: 840px;
}

.inventory-odoo-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.inventory-odoo-nav.module-base-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 0;
  padding: 0;
}

.inventory-odoo-nav.module-base-nav-sticky {
  position: sticky;
  top: 0.68rem;
  z-index: 26;
  border: 1px solid #d6deeb;
  border-radius: 14px;
  background: #f7f9fd;
  padding: 0.34rem;
}

.inventory-odoo-nav-link {
  min-height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: var(--bg-surface);
  color: #3a3a3a;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.42rem 0.66rem;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.16s ease;
}

.inventory-odoo-nav-link i {
  font-size: 0.82rem;
}

.inventory-odoo-nav-link:hover {
  border-color: #c7d3e4;
  background: #f4f7fc;
  color: #1a1a1a;
}

.inventory-odoo-nav-link.is-active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.11);
  color: #1d4ed8;
}

.inventory-odoo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.inventory-odoo-kpi {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 0.78rem;
  display: grid;
  gap: 0.15rem;
}

.inventory-odoo-kpi small {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b6b6b;
}

.inventory-odoo-kpi strong {
  font-size: 1.25rem;
  line-height: 1.2;
  color: #1a1a1a;
}

.inventory-odoo-kpi span {
  font-size: 0.74rem;
  color: #6b6b6b;
}

.inventory-odoo-main-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0.72rem;
}

.inventory-odoo-panel {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 0.78rem;
  display: grid;
  gap: 0.72rem;
}

.inventory-odoo-panel-narrow {
  max-width: 760px;
}

.inventory-odoo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inventory-odoo-panel-head-wrap {
  align-items: flex-start;
  flex-wrap: wrap;
}

.inventory-odoo-filter-chip-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inventory-odoo-filter-chip-group .btn {
  margin: 0 !important;
  min-height: 42px;
  padding-inline: 1rem;
  border-radius: 12px !important;
}

.inventory-odoo-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.inventory-odoo-panel-head span {
  color: #6b6b6b;
  font-size: 0.76rem;
  line-height: 1.4;
}

.inventory-odoo-scroll {
  max-height: 560px;
  overflow: auto;
}

.inventory-odoo-table {
  margin-bottom: 0;
}

.inventory-odoo-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b6b6b;
  border-bottom-color: #dbe3ef;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.inventory-odoo-table tbody td {
  font-size: 0.84rem;
  border-color: #ebeff7;
  color: #1a1a1a;
  vertical-align: middle;
}

.inventory-odoo-empty {
  text-align: center;
  color: #6b6b6b;
  padding: 1rem 0.6rem !important;
  font-size: 0.86rem;
}

.inventory-code {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

.inventory-number {
  direction: ltr;
  unicode-bidi: plaintext;
}

.inventory-odoo-form-grid {
  display: grid;
  gap: 0.65rem;
}

.inventory-odoo-form-grid label {
  display: grid;
  gap: 0.34rem;
}

.inventory-odoo-form-grid label > span {
  font-size: 0.76rem;
  color: #6b6b6b;
  font-weight: 700;
}

.inventory-odoo-form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-odoo-form-grid-2 > label {
  min-width: 0;
}

.inventory-odoo-form-grid-2 .stock-meta-input {
  min-height: 56px;
  max-height: 56px;
  height: 56px;
}

.inventory-odoo-form-grid-2 textarea.stock-meta-input {
  resize: none;
  overflow: auto;
}

.inventory-odoo-form-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-odoo-filter-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr auto;
  gap: 0.6rem;
  align-items: end;
}

.inventory-odoo-filter-grid-4 {
  grid-template-columns: 1.2fr 0.8fr 0.9fr auto;
}

.inventory-odoo-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.inventory-odoo-form-page {
  max-width: 980px;
}

.inventory-odoo-card-list {
  display: grid;
  gap: 0.65rem;
}

.inventory-odoo-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 0.75rem;
}

.inventory-odoo-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.inventory-odoo-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.inventory-odoo-card-status {
  text-align: end;
}

.inventory-odoo-subline {
  color: #6b6b6b;
  font-size: 0.76rem;
}

.inventory-odoo-progress {
  height: 0.92rem;
  border-radius: 999px;
  background: #e5eaf3;
}

.inventory-odoo-progress .progress-bar {
  font-size: 0.67rem;
  font-weight: 700;
}

.inventory-odoo-details summary {
  cursor: pointer;
}

.inventory-odoo-page .stock-lines-wrap {
  padding-top: 0;
}

.inventory-odoo-page .stock-lines-head h2 {
  font-size: 0.88rem;
}

.inventory-odoo-page .stock-item-select,
.inventory-odoo-page .stock-qty-input {
  min-height: 38px;
  border-radius: 10px;
}

.inventory-odoo-page .stock-submit-row {
  justify-content: flex-end;
}

.inventory-odoo-page .stock-confirm-btn {
  min-width: 220px;
}

.inventory-odoo-page .inventory-toggle {
  border-color: #dbe3ef;
  background: #fafafa;
}

.inventory-odoo-page .inventory-toggle-switch {
  border-color: #d3dcec;
  background: #9aa9bf;
}

.inventory-odoo-page .inventory-toggle-text {
  color: #3a3a3a;
  font-size: 0.72rem;
}

.inventory-odoo-page .inventory-toggle-input:checked + .inventory-toggle-switch {
  border-color: #f59e0b;
  background: #fbbf24;
}

@media (max-width: 1200px) {
  .inventory-odoo-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-odoo-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .inventory-odoo-nav.module-base-nav-sticky {
    top: 4rem;
  }

  .inventory-odoo-filter-grid,
  .inventory-odoo-filter-grid-4,
  .inventory-odoo-form-grid-2 {
    grid-template-columns: 1fr;
  }

  .inventory-odoo-card-status {
    text-align: start;
  }
}

@media (max-width: 768px) {
  .inventory-odoo-kpi-grid {
    grid-template-columns: 1fr;
  }

  .inventory-odoo-header-actions .btn {
    width: 100%;
  }

  .inventory-odoo-form-actions {
    justify-content: stretch;
  }

  .inventory-odoo-form-actions .btn {
    width: 100%;
  }
}

/* Inventory UI v4 (Odoo-structured overrides) */
.inventory-odoo-page {
  --inventory-surface: #ffffff;
  --inventory-surface-soft: #f5f6f8;
  --inventory-surface-strong: #f0f1f4;
  --inventory-line: #d8dbe3;
  --inventory-line-soft: #e6e8ee;
  --inventory-text: #2f3136;
  --inventory-text-soft: #6b7280;
  --inventory-hover: #f5f6f8;
  --inventory-accent: #714b67;
  --inventory-accent-strong: #5f3f57;
  --inventory-accent-soft: rgba(113, 75, 103, 0.1);
  --inventory-success: #21864b;
  --inventory-success-soft: rgba(33, 134, 75, 0.12);
  --inventory-warning: #a86f17;
  --inventory-warning-soft: rgba(168, 111, 23, 0.12);
  --inventory-muted-soft: rgba(107, 114, 128, 0.1);
  max-width: none;
  margin: 0;
  gap: 1rem;
}

body[data-theme="dark"] .inventory-odoo-page {
  --inventory-surface: #23252b;
  --inventory-surface-soft: #1d2025;
  --inventory-surface-strong: #2a2d34;
  --inventory-line: #3a3f49;
  --inventory-line-soft: #32363f;
  --inventory-text: #f3f4f6;
  --inventory-text-soft: #aab1bc;
  --inventory-hover: #2a2d34;
  --inventory-accent: #a37a97;
  --inventory-accent-strong: #8f667f;
  --inventory-accent-soft: rgba(163, 122, 151, 0.14);
  --inventory-success: #6fd6a0;
  --inventory-success-soft: rgba(111, 214, 160, 0.16);
  --inventory-warning: #efbc67;
  --inventory-warning-soft: rgba(239, 188, 103, 0.16);
  --inventory-muted-soft: rgba(170, 177, 188, 0.12);
}

.inventory-odoo-header {
  align-items: center;
}

.inventory-odoo-controlbar {
  padding-bottom: 0;
}

.inventory-odoo-breadcrumbs {
  display: grid;
  gap: 0.12rem;
}

.inventory-odoo-breadcrumbs span {
  font-size: 0.72rem;
  color: var(--inventory-text-soft);
  font-weight: 600;
}

.inventory-odoo-breadcrumbs strong {
  font-size: 1.12rem;
  color: var(--inventory-text);
  font-weight: 700;
}

.inventory-odoo-header h1 {
  font-size: 1.12rem;
}

.inventory-odoo-header p,
.inventory-odoo-shortcuts,
.inventory-odoo-kpi-grid {
  display: none !important;
}

.inventory-odoo-nav.module-base-nav-sticky {
  border-radius: 8px;
  background: var(--inventory-surface);
  box-shadow: none;
  padding: 0.55rem 0.7rem;
}

.inventory-odoo-nav.inventory-odoo-nav-groups {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.inventory-odoo-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: max-content;
}

.inventory-odoo-nav-group + .inventory-odoo-nav-group {
  position: relative;
}

.inventory-odoo-nav-group + .inventory-odoo-nav-group::before {
  content: "";
  width: 1px;
  height: 1.7rem;
  background: var(--inventory-line);
  margin-inline-end: 0.65rem;
}

.inventory-odoo-nav-group-title {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding-inline: 0.2rem 0.45rem;
  color: var(--inventory-text-soft);
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.inventory-odoo-nav-link {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--inventory-text-soft);
  padding: 0.38rem 0.7rem;
  font-size: 0.77rem;
  font-weight: 600;
}

.inventory-odoo-nav-link:hover {
  border-color: var(--inventory-line-soft);
  background: var(--inventory-hover);
}

.inventory-odoo-nav-link.is-active {
  border-color: color-mix(in srgb, var(--inventory-accent), #ffffff 35%);
  background: var(--inventory-accent-soft);
  color: var(--inventory-accent);
}

.inventory-odoo-main-grid,
.inventory-odoo-main-grid--inventory {
  grid-template-columns: 1fr;
}

.inventory-odoo-panel {
  border: 1px solid var(--inventory-line);
  border-radius: 8px;
  background: var(--inventory-surface);
  padding: 0.95rem;
  box-shadow: none;
}

.inventory-odoo-panel-head h2 {
  font-size: 0.94rem;
  font-weight: 700;
}

.inventory-odoo-panel-head > span,
.inventory-odoo-panel-head > div > span,
.inventory-inline-note {
  display: none;
}

.inventory-odoo-filter-chip-group .btn {
  min-height: 34px;
  padding-inline: 0.85rem;
  border-radius: 6px !important;
}

.inventory-odoo-table {
  min-width: 760px;
  border-collapse: collapse;
}

.inventory-odoo-table thead th {
  background: var(--inventory-surface-strong);
  border-bottom: 1px solid var(--inventory-line);
  color: var(--inventory-text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.inventory-odoo-table tbody td {
  background: var(--inventory-surface);
  border-color: var(--inventory-line-soft);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.inventory-odoo-table tbody tr:nth-child(even) td {
  background: var(--inventory-surface);
}

.inventory-odoo-table tbody tr:hover td {
  background: var(--inventory-hover);
}

.inventory-table-secondary {
  color: var(--inventory-text-soft);
  font-size: 0.74rem;
}

.inventory-odoo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.inventory-odoo-badge.is-success {
  color: var(--inventory-success);
  background: var(--inventory-success-soft);
  border-color: color-mix(in srgb, var(--inventory-success), #ffffff 68%);
}

.inventory-odoo-badge.is-warning {
  color: var(--inventory-warning);
  background: var(--inventory-warning-soft);
  border-color: color-mix(in srgb, var(--inventory-warning), #ffffff 68%);
}

.inventory-odoo-badge.is-muted {
  color: var(--inventory-text-soft);
  background: var(--inventory-muted-soft);
  border-color: color-mix(in srgb, var(--inventory-text-soft), #ffffff 74%);
}

.inventory-odoo-inline-details summary {
  color: var(--inventory-accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.inventory-odoo-inline-details summary::-webkit-details-marker {
  display: none;
}

.inventory-odoo-page .form-control,
.inventory-odoo-page .form-select,
.inventory-odoo-page textarea.form-control,
.inventory-odoo-page .stock-item-select,
.inventory-odoo-page .stock-qty-input {
  border-color: var(--inventory-line);
  border-radius: 6px;
  background: var(--inventory-surface);
  color: var(--inventory-text);
  box-shadow: none;
}

.inventory-odoo-page .form-control:focus,
.inventory-odoo-page .form-select:focus {
  border-color: color-mix(in srgb, var(--inventory-accent), #ffffff 30%);
  box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--inventory-accent-soft), transparent 18%);
}

.inventory-odoo-page .btn {
  min-height: 34px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: none !important;
}

.inventory-odoo-page .btn-primary,
.inventory-odoo-page .btn-warning {
  color: #ffffff;
  background: var(--inventory-accent);
  border-color: var(--inventory-accent);
}

.inventory-odoo-page .btn-primary:hover,
.inventory-odoo-page .btn-warning:hover {
  color: #ffffff;
  background: var(--inventory-accent-strong);
  border-color: var(--inventory-accent-strong);
}

.inventory-odoo-page .btn-outline-primary,
.inventory-odoo-page .btn-outline-secondary {
  color: var(--inventory-text);
  background: var(--inventory-surface);
  border-color: var(--inventory-line);
}

.inventory-odoo-page .btn-outline-primary:hover,
.inventory-odoo-page .btn-outline-secondary:hover {
  color: var(--inventory-text);
  background: var(--inventory-hover);
  border-color: color-mix(in srgb, var(--inventory-accent), var(--inventory-line) 62%);
}

.inventory-odoo-page .inventory-toggle {
  border-color: var(--inventory-line);
  background: var(--inventory-surface-soft);
}

.inventory-odoo-page .inventory-toggle-switch {
  border-color: var(--inventory-line);
  background: #a8afb9;
}

.inventory-odoo-page .inventory-toggle-text {
  color: var(--inventory-text-soft);
}

.inventory-odoo-page .inventory-toggle-input:checked + .inventory-toggle-switch {
  border-color: var(--inventory-accent);
  background: var(--inventory-accent);
}

@media (max-width: 992px) {
  .inventory-odoo-nav.inventory-odoo-nav-groups {
    gap: 0.75rem;
  }

  .inventory-odoo-nav-group + .inventory-odoo-nav-group::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .inventory-odoo-nav.inventory-odoo-nav-groups {
    display: grid;
    gap: 0.65rem;
  }

  .inventory-odoo-nav-group {
    min-width: 0;
  }

  .inventory-odoo-nav-group-title {
    width: 100%;
    min-height: auto;
    padding: 0;
  }
}

/* Inventory UI v5 (items-first, tighter Odoo list view) */
.inventory-odoo-page {
  background: #f5f6f8;
  padding: 0.2rem 0 1rem;
}

body[data-theme="dark"] .inventory-odoo-page {
  background: #1d2025;
}

.inventory-odoo-header-actions {
  gap: 0.45rem;
}

.inventory-odoo-nav.inventory-odoo-nav-compact {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.inventory-odoo-nav.inventory-odoo-nav-compact .inventory-odoo-nav-link {
  min-height: 34px;
  padding: 0.4rem 0.72rem;
}

.inventory-odoo-nav.inventory-odoo-nav-compact .inventory-odoo-nav-link i {
  font-size: 0.8rem;
}

.inventory-odoo-toolbar {
  padding: 0.75rem 0.9rem;
}

.inventory-odoo-toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 180px) auto;
  gap: 0.75rem;
  align-items: end;
}

.inventory-odoo-toolbar-field {
  display: grid;
  gap: 0.32rem;
}

.inventory-odoo-toolbar-field--grow {
  min-width: 0;
}

.inventory-odoo-toolbar-field > span {
  font-size: 0.74rem;
  color: var(--inventory-text-soft);
  font-weight: 700;
}

.inventory-odoo-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.inventory-odoo-panel.inventory-odoo-toolbar,
.inventory-odoo-panel.inventory-odoo-toolbar .inventory-odoo-toolbar-row,
.inventory-odoo-panel.inventory-odoo-toolbar .inventory-odoo-toolbar-field {
  min-height: 0;
}

@media (max-width: 992px) {
  .inventory-odoo-toolbar-row {
    grid-template-columns: 1fr;
  }
}

/* ============ Login page rules (restored 2026-04-15) ============ */
.ds-login {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #0b1020;
  color: #ffffff;
  font-family: inherit;
  overflow: hidden;
  position: relative;
}
.ds-login::before,
.ds-login::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}
.ds-login::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, #6366f1, transparent 60%);
  top: -120px;
  inset-inline-start: -120px;
}
.ds-login::after {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at 60% 60%, #06b6d4, transparent 60%);
  bottom: -200px;
  inset-inline-end: -180px;
}

/* ---- Left brand pane ---- */
.ds-login-brand {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  position: relative;
  z-index: 2;
  background:
    linear-gradient(135deg, rgba(99,102,241,.28) 0%, rgba(14,165,233,.16) 50%, rgba(236,72,153,.12) 100%),
    linear-gradient(180deg, rgba(15,20,30,.65), rgba(15,20,30,.92));
  border-inline-end: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
.ds-login-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ds-login-brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -10px rgba(99,102,241,.6);
}
.ds-login-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.ds-login-brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
}
.ds-login-brand-name small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}

.ds-login-brand-center {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}
.ds-login-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  width: max-content;
  font-size: 12px;
  font-weight: 700;
  color: #c7d2fe;
  letter-spacing: .04em;
}
.ds-login-brand-badge i { font-size: 14px; color: #a5b4fc; }
.ds-login-brand-title {
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(120deg, #ffffff 0%, #c7d2fe 55%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ds-login-brand-sub {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(226,232,240,.78);
  margin: 0;
  max-width: 520px;
}

.ds-login-brand-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 640px;
}
.ds-login-brand-feature {
  padding: 16px 18px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .25s ease, background-color .25s ease;
}
.ds-login-brand-feature:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.07);
}
.ds-login-brand-feature-ico {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #a5b4fc;
  background: rgba(99,102,241,.16);
  border: 1px solid rgba(99,102,241,.3);
}
.ds-login-brand-feature-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}
.ds-login-brand-feature-sub {
  font-size: 12px;
  color: rgba(226,232,240,.65);
  line-height: 1.45;
}

.ds-login-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.45);
  gap: 10px;
}
.ds-login-brand-dots {
  display: inline-flex;
  gap: 5px;
}
.ds-login-brand-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}
.ds-login-brand-dots span:first-child {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,.6);
}

/* ---- Right form pane ---- */
.ds-login-form-pane {
  flex: 0 0 42%;
  min-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  position: relative;
  z-index: 3;
  background: linear-gradient(180deg, rgba(15,20,32,.75), rgba(15,20,32,.92));
}
.ds-login-card {
  width: 100%;
  max-width: 420px;
  padding: 38px 36px 32px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.04) inset;
}
.ds-login-card-header {
  text-align: center;
  margin-bottom: 28px;
}
.ds-login-card-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.ds-login-card-header p {
  font-size: 13px;
  color: rgba(226,232,240,.65);
  margin: 0;
}

.ds-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ds-login-field { display: flex; flex-direction: column; gap: 6px; }
.ds-login-field > label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(226,232,240,.75);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-inline-start: 2px;
}
.ds-login-input-wrap {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  background: rgba(15,20,32,.55);
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 6px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
  height: 52px;
  width: 100%;
  padding: 0 !important;
}
.ds-login-input-wrap:focus-within {
  border-color: #818cf8 !important;
  background: rgba(15,20,32,.75);
  box-shadow: 0 0 0 4px rgba(129,140,248,.18);
}
.ds-login-input-wrap .ds-login-input-ico {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 100% !important;
  color: rgba(165,180,252,.75);
  flex: none;
  pointer-events: none;
}
.ds-login-input-wrap input,
.ds-login-input-wrap input.form-control,
body.ds-login-body .ds-login-input-wrap input {
  flex: 1 1 auto !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  height: 100% !important;
  padding: 0 4px !important;
  min-width: 0 !important;
  box-shadow: none !important;
  width: auto !important;
}
.ds-login-input-wrap input::placeholder { color: rgba(148,163,184,.5) !important; }
.ds-login-input-wrap input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(15,20,32,.55) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Password reveal button � must live INSIDE the wrap on the trailing edge */
.ds-login-reveal {
  width: 48px !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  border-inline-start: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(165,180,252,.75) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  flex: 0 0 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: color .15s ease, background-color .15s ease;
}
.ds-login-reveal:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,.05) !important;
}
.ds-login-reveal svg { display: block; }
.ds-login-reveal .ds-login-reveal-off { display: none; }
.ds-login-reveal.is-on .ds-login-reveal-on { display: none; }
.ds-login-reveal.is-on .ds-login-reveal-off { display: block; }

/* Remember me: full-width card with a big visible checkbox */
.ds-login-remember,
label.ds-login-remember,
body.ds-login-body .ds-login-remember {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  color: rgba(226,232,240,.85) !important;
  margin: 2px 0 6px !important;
  padding: 12px 14px !important;
  background: rgba(15,20,32,.4) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 6px !important;
  transition: background-color .15s ease, border-color .15s ease;
  width: 100%;
  box-sizing: border-box;
}
.ds-login-remember:hover {
  background: rgba(15,20,32,.6) !important;
  border-color: rgba(129,140,248,.3) !important;
  color: #ffffff !important;
}
.ds-login-remember input[type="checkbox"],
.ds-login-remember input.form-check-input,
body.ds-login-body .ds-login-remember input {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  border: 1.5px solid rgba(165,180,252,.45) !important;
  background: rgba(15,20,32,.8) !important;
  cursor: pointer;
  position: relative;
  flex: 0 0 20px !important;
  transition: all .15s ease;
  box-shadow: none !important;
}
.ds-login-remember input[type="checkbox"]:hover,
.ds-login-remember input.form-check-input:hover {
  border-color: #a5b4fc !important;
}
.ds-login-remember input[type="checkbox"]:checked,
.ds-login-remember input.form-check-input:checked {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: #818cf8 !important;
  box-shadow: 0 4px 12px -4px rgba(129,140,248,.6) !important;
}
.ds-login-remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ds-login-remember span { flex: 1; }

.ds-login-submit {
  height: 48px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  background-size: 200% 200%;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, background-position .4s ease;
  box-shadow: 0 20px 40px -18px rgba(99,102,241,.8);
  margin-top: 4px;
}
.ds-login-submit:hover {
  transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow: 0 30px 60px -20px rgba(99,102,241,1);
}
.ds-login-submit:active { transform: translateY(0); }
.ds-login-submit i { font-size: 16px; }

.ds-login-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
}
.ds-login-error ul { margin: 0; padding-inline-start: 18px; }
.ds-login-field .text-danger {
  color: #fca5a5 !important;
  font-size: 11px;
  margin-top: 2px;
  padding-inline-start: 2px;
}

.ds-login-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  font-size: 12px;
  color: rgba(226,232,240,.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ds-login-note strong { color: rgba(226,232,240,.8); font-weight: 700; }

/* Install-app button (shown ONLY on the login page, only when the browser
   supports the beforeinstallprompt event) ---------------------------------- */
.ds-login-install {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px dashed rgba(165,180,252,.45);
  background: rgba(99,102,241,.08);
  color: #c7d2fe;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease, border-color .2s ease;
}
.ds-login-install:hover {
  background: rgba(99,102,241,.18);
  border-color: rgba(165,180,252,.75);
  transform: translateY(-1px);
}
.ds-login-install i { font-size: 18px; }
.ds-login-install.d-none { display: none !important; }

.ds-login-lang-switch {
  position: absolute;
  top: 22px;
  inset-inline-end: 22px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(15,20,32,.9);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  z-index: 10;
}
.ds-login-lang-switch a {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: rgba(226,232,240,.6);
  text-decoration: none;
  transition: all .15s ease;
}
.ds-login-lang-switch a:hover { color: #ffffff; }
.ds-login-lang-switch a.is-active {
  background: rgba(99,102,241,.2);
  color: #c7d2fe;
  box-shadow: inset 0 0 0 1px rgba(129,140,248,.3);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .ds-login-brand { padding: 40px 48px; flex-basis: 52%; }
  .ds-login-form-pane { padding: 40px 36px; }
  .ds-login-brand-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .ds-login { flex-direction: column; }
  .ds-login-brand {
    flex: 0 0 auto;
    padding: 32px 28px 20px;
    border-inline-end: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .ds-login-brand-center { gap: 12px; }
  .ds-login-brand-title { font-size: 26px; }
  .ds-login-brand-sub { font-size: 13px; }
  .ds-login-brand-features { display: none; }
  .ds-login-brand-footer { display: none; }
  .ds-login-form-pane { flex: 1 1 auto; padding: 24px 20px 40px; min-width: 0; }
  .ds-login-card { padding: 28px 22px 24px; border-radius: 18px; }
}
@media (max-width: 480px) {
  .ds-login-brand { padding: 24px 20px 14px; }
  .ds-login-brand-header { gap: 10px; }
  .ds-login-brand-logo { width: 44px; height: 44px; border-radius: 6px; }
  .ds-login-brand-name { font-size: 18px; }
  .ds-login-brand-title { font-size: 22px; }
}

/* =============================================================================
   INVENTORY UNIFICATION � single canonical layout for every inventory screen
   =============================================================================
   Fixes:
   - Page widths now identical across Items / FinishedGoods / Stock / Warehouse
   - Frame/panel padding & border-radius unified
   - Action buttons always pinned to the inline-start (right in RTL)
   - Filter chips + toolbars laid out consistently
   - Dark-mode dark blocks on Raw Materials killed
   - Forbids the old "#1f2024 / #24272d" black bleed from inventory-items.css
   ============================================================================= */

/* Canonical max-width + padding for every inventory page -------------------- */
body[data-ds-enabled="1"].inventory-page-flat-v2 .erp-content,
body[data-ds-enabled="1"] .erp-compact-page,
body[data-ds-enabled="1"] .module-page.inventory-odoo-page,
body[data-ds-enabled="1"] .module-page.inventory-warehouse-page,
body[data-ds-enabled="1"] .inventory-items-v2-page {
  background: var(--ds-surface, #f6f8fb) !important;
  background-image: none !important;
}
body[data-ds-enabled="1"][data-ds-mode="dark"].inventory-page-flat-v2 .erp-content,
body[data-ds-enabled="1"][data-ds-mode="dark"] .erp-compact-page,
body[data-ds-enabled="1"][data-ds-mode="dark"] .module-page.inventory-odoo-page,
body[data-ds-enabled="1"][data-ds-mode="dark"] .module-page.inventory-warehouse-page,
body[data-ds-enabled="1"][data-ds-mode="dark"] .inventory-items-v2-page {
  background: #0f141b !important;
}
}
