/* =========================================================
   Body Structure Gym Equipment Manufacturer
   UI inspired by Dreams ERP dashboard layout
   Powered by: AxionSoft Technologies Pvt Ltd
   ========================================================= */

@font-face {
  font-family: "Ethnocentric";
  src:
    local("Ethnocentric Bold Italic"),
    local("Ethnocentric-BoldItalic"),
    url("/fonts/Ethnocentric-BoldItalic.woff2") format("woff2"),
    url("/fonts/Ethnocentric-BoldItalic.woff") format("woff"),
    url("/fonts/Ethnocentric-BoldItalic.otf") format("opentype"),
    url("/fonts/Ethnocentric-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Dreams-style layout + Body Structure blue (was green) */
  --gef-primary: #1a4f9c;
  --gef-primary-dark: #123a75;
  --gef-primary-soft: rgba(26, 79, 156, 0.12);
  --gef-accent: #ff6b4a;
  --gef-accent-soft: rgba(255, 107, 74, 0.12);
  --gef-warning: #f5a623;
  --gef-info: #3b82f6;
  --gef-purple: #8b5cf6;
  --gef-danger: #ef4444;
  --gef-sidebar-w: 260px;
  --gef-sidebar-collapsed: 78px;
  --gef-topbar-h: 64px;
  --gef-radius: 12px;
  --gef-radius-sm: 8px;
  --gef-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --gef-brand-font: "Ethnocentric", "Ethnocentric Bold Italic", var(--gef-font);
  --gef-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --gef-shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);

  --gef-bg: #f7f8fa;
  --gef-surface: #ffffff;
  --gef-border: #e8eaef;
  --gef-text: #1f2937;
  --gef-text-muted: #6b7280;
  --gef-sidebar-bg: #ffffff;
  --gef-sidebar-text: #4b5563;
  --gef-sidebar-active: #1a4f9c;
  --gef-topbar-bg: #ffffff;
}

[data-theme="dark"] {
  --gef-bg: #0f1419;
  --gef-surface: #1a2332;
  --gef-border: #2a3544;
  --gef-text: #e5e7eb;
  --gef-text-muted: #9ca3af;
  --gef-sidebar-bg: #141c27;
  --gef-sidebar-text: #9ca3af;
  --gef-topbar-bg: #141c27;
  --gef-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --gef-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --gef-primary: #5b8fdb;
  --gef-primary-dark: #3d74c4;
  --gef-primary-soft: rgba(91, 143, 219, 0.18);
  --gef-accent-soft: rgba(255, 107, 74, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  /* clip avoids horizontal page scroll without breaking position:sticky
     (overflow-x:hidden on body forces overflow-y:auto and sticky fails) */
  overflow-x: clip;
}

body.gef-body {
  margin: 0;
  font-family: var(--gef-font);
  font-size: 14px;
  color: var(--gef-text);
  background: var(--gef-bg);
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: var(--gef-primary);
}

/* ---------- App Shell ---------- */
.gef-app {
  min-height: 100vh;
  display: flex;
}

.gef-sidebar {
  width: var(--gef-sidebar-w);
  background: var(--gef-sidebar-bg);
  border-right: 1px solid var(--gef-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, transform 0.25s ease;
}

.gef-sidebar-brand {
  height: var(--gef-topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--gef-border);
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.gef-sidebar-brand-axion {
  gap: 12px;
}

.gef-sidebar-axion-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--gef-border);
}

.gef-sidebar-axion-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.gef-sidebar-axion-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--gef-text);
}

.gef-sidebar-axion-text small {
  font-size: 11px;
  color: var(--gef-muted);
  font-weight: 500;
}

.gef-db-code {
  font-size: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  color: #334155;
}

.gef-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a4f9c, #8b97a8);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

/* crisp logo scaling — prefer smooth downsample for photos/logos */
.gef-brand-logo,
.gef-auth-logo,
.gef-auth-panel-logo,
.gef-company-logo {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

.gef-brand-logo-sm {
  width: 36px;
  height: 36px;
}

.gef-brand-logo-md {
  width: 48px;
  height: 48px;
}

.gef-brand-logo-lg {
  width: 72px;
  height: 72px;
}

.gef-brand-logo-xl {
  width: 120px;
  height: 120px;
}

.gef-company-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--gef-border);
  flex-shrink: 0;
  padding: 2px;
}

.gef-logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a2332 0%, #0f1724 100%);
  border: 1px solid rgba(197, 164, 106, 0.35);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gef-logo-plate.center {
  display: flex;
  margin: 0 auto 22px;
  width: fit-content;
  background: linear-gradient(160deg, #f7f8fb 0%, #e8edf5 100%);
  border: 1px solid #d0d7e4;
  box-shadow: 0 8px 24px rgba(18, 58, 117, 0.1);
}

.gef-auth-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.gef-auth-panel-logo {
  width: 152px;
  height: 152px;
  object-fit: contain;
  display: block;
}

.gef-logo-plate-axion,
.gef-logo-plate-axion-light {
  background: #ffffff !important;
  border: 1px solid #e6ebf2 !important;
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.gef-logo-plate-axion-light {
  margin-bottom: 18px;
}

.gef-sidebar-brand-suite {
  height: auto;
  min-height: 78px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
}

.gef-suite-wordmark {
  width: 100%;
  height: 54px;
  object-fit: contain;
  object-position: left center;
  background: #ffffff;
  border-radius: 8px;
  display: block;
}

.gef-company-logo.gef-suite-mark {
  width: 124px;
  height: 38px;
  padding: 2px 4px;
  background: #ffffff;
  border-color: #e6ebf2;
  border-radius: 8px;
}

.gef-auth-logo-axion {
  width: min(420px, 100%);
  height: auto;
  max-height: 150px;
  object-fit: contain;
  display: block;
}

.gef-auth-panel-logo-axion {
  width: min(280px, 100%);
  height: auto;
  max-height: 100px;
  object-fit: contain;
  display: block;
}

.gef-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.gef-brand-text strong,
.gef-brand-name,
.gef-company-select span {
  font-family: var(--gef-brand-font);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gef-brand-text strong {
  font-size: 12px;
  color: var(--gef-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gef-brand-text small {
  font-family: var(--gef-brand-font);
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gef-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gef-brand-name {
  font-size: 15px;
  line-height: 1.25;
}

.gef-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px;
}

.gef-nav-section {
  margin-bottom: 8px;
}

.gef-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gef-text-muted);
  padding: 10px 12px 6px;
}

.gef-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--gef-radius-sm);
  color: var(--gef-sidebar-text);
  font-weight: 500;
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.gef-nav-link i,
.gef-nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.gef-nav-link:hover {
  background: var(--gef-bg);
  color: var(--gef-text);
}

.gef-nav-link.active {
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
  font-weight: 600;
}

[data-theme="dark"] .gef-nav-link.active {
  color: var(--gef-primary);
}

.gef-nav-link .badge-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gef-accent);
}

.gef-nav-toggle {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.gef-nav-toggle.open {
  transform: rotate(90deg);
}

.gef-submenu {
  display: none;
  padding-left: 18px;
  margin-bottom: 4px;
}

.gef-submenu.show {
  display: block;
}

.gef-submenu .gef-nav-link {
  font-size: 13px;
  padding: 7px 12px;
}

.gef-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gef-border);
  font-size: 11px;
  color: var(--gef-text-muted);
  line-height: 1.4;
  flex-shrink: 0;
}

.gef-sidebar-footer strong {
  color: var(--gef-text);
  font-weight: 600;
}

/* ---------- Main ---------- */
.gef-main {
  margin-left: var(--gef-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}

.gef-topbar {
  height: var(--gef-topbar-h);
  background: var(--gef-topbar-bg);
  border-bottom: 1px solid var(--gef-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1030;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.gef-topbar-left,
.gef-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gef-topbar-left {
  flex: 1;
}

.gef-topbar-right {
  flex-shrink: 0;
}

.gef-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--gef-border);
  background: var(--gef-surface);
  color: var(--gef-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.gef-icon-btn:hover {
  border-color: var(--gef-primary);
  color: var(--gef-primary);
}

.gef-icon-btn .notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gef-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.gef-company-select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--gef-border);
  border-radius: 10px;
  background: var(--gef-surface);
  cursor: pointer;
  max-width: 280px;
  color: var(--gef-text);
}

.gef-company-select::after {
  margin-left: 4px;
}

.gef-company-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.gef-company-select span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gef-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--gef-border);
  background: var(--gef-surface);
  cursor: pointer;
  color: var(--gef-text);
}

.gef-user-chip img,
.gef-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}

.gef-content {
  padding: 20px 24px 40px;
  flex: 1;
}

.gef-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gef-page-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--gef-text);
}

.gef-page-head p {
  margin: 0;
  color: var(--gef-text-muted);
  font-size: 13px;
}

.gef-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.gef-card {
  background: var(--gef-surface);
  border: 1px solid var(--gef-border);
  border-radius: var(--gef-radius);
  box-shadow: var(--gef-shadow);
  height: 100%;
}

.gef-card-auto,
.gef-list-card {
  height: auto !important;
}

.gef-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  gap: 8px;
}

.gef-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.gef-card-body {
  padding: 16px 18px 18px;
}

.gef-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--gef-border);
}

/* ---------- KPI ---------- */
.gef-kpi {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gef-kpi-label {
  font-size: 13px;
  color: var(--gef-text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.gef-kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--gef-text);
}

.gef-kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gef-kpi-trend.up {
  color: var(--gef-primary);
}

.gef-kpi-trend.down {
  color: var(--gef-accent);
}

.gef-kpi-trend span {
  color: var(--gef-text-muted);
  font-weight: 500;
}

.gef-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.gef-kpi-icon.green {
  background: var(--gef-primary-soft);
  color: var(--gef-primary);
}

.gef-kpi-icon.orange {
  background: var(--gef-accent-soft);
  color: var(--gef-accent);
}

.gef-kpi-icon.blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--gef-info);
}

.gef-kpi-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--gef-purple);
}

.gef-kpi-icon.amber {
  background: rgba(245, 166, 35, 0.14);
  color: var(--gef-warning);
}

/* ---------- Buttons ---------- */
.btn-gef {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
}

.btn-gef i,
.btn-gef svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-gef-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-gef-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
}

.btn-gef-primary {
  background: var(--gef-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(26, 79, 156, 0.28);
}

.btn-gef-primary:hover {
  background: var(--gef-primary-dark);
  color: #fff;
}

.btn-gef-outline {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.btn-gef-outline:hover {
  border-color: var(--gef-primary);
  color: var(--gef-primary);
  background: var(--gef-primary-soft);
}

.btn-gef-soft-primary {
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
  border: 1px solid rgba(26, 79, 156, 0.18);
}

.btn-gef-soft-primary:hover {
  background: rgba(26, 79, 156, 0.18);
  color: var(--gef-primary-dark);
}

.btn-gef-soft-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.btn-gef-soft-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-gef-soft-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.btn-gef-soft-info:hover {
  background: #dbeafe;
}

.btn-gef-action {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
  min-height: 36px;
  padding: 8px 14px;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-gef-action:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.btn-gef-lg {
  min-height: 40px;
  padding: 10px 18px;
  font-size: 14px;
}

.btn-gef.is-loading,
.btn-gef:disabled {
  pointer-events: none;
  opacity: 0.78;
  cursor: wait;
}

.btn-gef.is-loading .js-btn-icon,
.btn-gef.is-loading i,
.btn-gef.is-loading svg {
  animation: gef-spin 0.8s linear infinite;
}

@keyframes gef-spin {
  to { transform: rotate(360deg); }
}

.gef-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}

.gef-no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: #eef4fc;
  border: 1px dashed rgba(26, 79, 156, 0.28);
  color: #1a4f9c;
  margin-bottom: 8px;
}

.gef-no-image i,
.gef-no-image svg {
  width: 28px;
  height: 28px;
}

.gef-no-image strong {
  font-size: 12px;
  font-weight: 700;
}

.gef-no-image small {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

input.js-number::-webkit-outer-spin-button,
input.js-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input.js-number {
  -moz-appearance: textfield;
  appearance: textfield;
}

.gef-field-hint {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
  color: #94a3b8;
  font-weight: 500;
}

.gef-section-note {
  margin: -4px 0 12px;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
  font-weight: 500;
}

.gef-check-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.gef-select {
  appearance: none;
  background: var(--gef-surface);
  border: 1px solid var(--gef-border);
  border-radius: 8px;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gef-text);
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

/* ---------- Lists / Status ---------- */
.gef-invoice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gef-border);
}

.gef-invoice-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.gef-invoice-item:first-child {
  padding-top: 0;
}

.gef-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.gef-status.paid {
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
}

.gef-status.unpaid {
  background: var(--gef-accent-soft);
  color: var(--gef-accent);
}

.gef-status.partial {
  background: rgba(139, 92, 246, 0.12);
  color: var(--gef-purple);
}

.gef-status.overdue {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.gef-status.canceled {
  background: rgba(239, 68, 68, 0.12);
  color: var(--gef-danger);
}

.gef-status.in-progress {
  background: rgba(59, 130, 246, 0.12);
  color: var(--gef-info);
}

.gef-status.pending {
  background: rgba(245, 166, 35, 0.14);
  color: #b45309;
}

.gef-status.completed {
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
}

/* ---------- Table ---------- */
.gef-table-wrap {
  overflow-x: auto;
}

.gef-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gef-border);
}

.gef-table-toolbar .gef-search {
  position: relative;
  min-width: 240px;
}

.gef-table-toolbar .gef-search i,
.gef-table-toolbar .gef-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #9ca3af;
}

.gef-table-toolbar .gef-search input {
  height: 36px;
  padding-left: 34px;
  width: 100%;
}

.gef-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gef-table thead th {
  text-align: left;
  padding: 11px 14px;
  color: #123a75;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(26, 79, 156, 0.18);
  white-space: nowrap;
  background: linear-gradient(180deg, #eef4fc 0%, #e4eef9 100%);
}

.gef-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
  white-space: nowrap;
  color: #374151;
}

.gef-table tbody tr:last-child td {
  border-bottom: 0;
}

.gef-table tbody tr:hover td {
  background: #f9fafb;
}

.gef-table-company {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gef-table-company img,
.gef-table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #f3f4f6;
  border: 1px solid #e6eaef;
  flex-shrink: 0;
}

.gef-table-avatar {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gef-primary);
  background: var(--gef-primary-soft);
}

.gef-table-avatar svg,
.gef-table-avatar i {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.gef-table-company strong {
  display: block;
  font-size: 13px;
  color: #111827;
}

.gef-table-company small {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

.gef-card-body.p-0 {
  padding: 0;
}

/* ---------- Progress / Alerts ---------- */
.gef-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gef-border);
}

.gef-alert-item:last-child {
  border-bottom: 0;
}

.gef-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--gef-border);
  overflow: hidden;
}

.gef-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gef-primary);
}

.gef-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gef-text-muted);
}

.gef-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
}

.gef-chart-box {
  position: relative;
  height: 260px;
}

.gef-chart-box.sm {
  height: 200px;
}

/* ---------- Collapsed / Mobile ---------- */
body.sidebar-collapsed .gef-sidebar {
  width: var(--gef-sidebar-collapsed);
}

body.sidebar-collapsed .gef-main {
  margin-left: var(--gef-sidebar-collapsed);
}

body.sidebar-collapsed .gef-brand-text,
body.sidebar-collapsed .gef-nav-label,
body.sidebar-collapsed .gef-nav-link span,
body.sidebar-collapsed .gef-nav-toggle,
body.sidebar-collapsed .gef-sidebar-footer,
body.sidebar-collapsed .gef-submenu {
  display: none !important;
}

body.sidebar-collapsed .gef-brand-logo-md {
  width: 40px;
  height: 40px;
}

body.sidebar-collapsed .gef-suite-wordmark {
  height: 36px;
  object-position: center;
}

body.sidebar-collapsed .gef-nav-link {
  justify-content: center;
  padding: 10px;
}

body.sidebar-collapsed .gef-sidebar-brand {
  justify-content: center;
  padding: 0;
}

.gef-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1035;
}

@media (max-width: 991.98px) {
  .gef-sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-open .gef-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .gef-sidebar-overlay {
    display: block;
  }

  .gef-main,
  body.sidebar-collapsed .gef-main {
    margin-left: 0;
    padding-top: var(--gef-topbar-h);
  }

  /* Keep topbar fixed on mobile — no scroll with page content */
  .gef-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: var(--gef-topbar-h);
    padding: 0 10px;
    margin: 0;
    z-index: 1030;
    overflow: visible;
    box-sizing: border-box;
  }

  .gef-topbar-left,
  .gef-topbar-right {
    gap: 6px;
  }

  .gef-company-select {
    max-width: min(180px, 42vw);
    padding: 4px 8px;
  }

  .gef-company-select span {
    display: none;
  }

  .gef-company-select::after {
    display: none;
  }

  .gef-company-logo {
    width: 32px;
    height: 32px;
  }

  .gef-icon-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  /* Hide secondary icons so notification/user stay visible without horizontal scroll */
  .gef-topbar-right > .gef-icon-btn[title="Search"],
  .gef-topbar-right > .gef-icon-btn[title="Messages"] {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .gef-company-select {
    max-width: 48px;
    padding: 4px;
    justify-content: center;
  }

  .gef-user-chip {
    padding: 3px;
  }
}

/* ---------- Login ---------- */
.gef-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: #eef1f6;
}

.gef-auth-visual {
  position: relative;
  overflow: auto;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(91, 143, 219, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(197, 164, 106, 0.12), transparent 50%),
    linear-gradient(155deg, #0b1220 0%, #15233a 42%, #1a4f9c 100%);
  color: #f3f6fb;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 22px;
}

.gef-auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 4 L68 22 L68 50 L36 68 L4 50 L4 22 Z' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 72px 72px;
  pointer-events: none;
}

.gef-auth-visual > * {
  position: relative;
  z-index: 1;
}

.gef-auth-visual h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin: 20px 0 12px;
  max-width: 440px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.gef-auth-visual p {
  opacity: 0.88;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.65;
  color: #c5d0e0;
}

.gef-auth-audience h1 {
  font-size: 28px;
  max-width: 640px;
  margin-top: 16px;
}

.gef-auth-audience > p {
  max-width: 640px;
}

.gef-suite-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: 16px;
}

.gef-suite-group h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5c16c;
}

.gef-suite-group p {
  margin: 0;
  max-width: none;
  font-size: 13px;
  line-height: 1.5;
  color: #d5deea;
}

.gef-suite-group-wide {
  grid-column: 1 / -1;
}

.gef-auth-visual-footer {
  margin-top: auto;
  font-size: 13px;
  color: #a8b3c5;
}

.gef-auth-visual-footer strong {
  color: #e8edf5;
}

.gef-auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    linear-gradient(180deg, #f7f9fc 0%, #eef1f6 100%);
}

.gef-auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 36, 0.08);
}

.gef-auth-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #152033;
  text-align: center;
}

.gef-auth-card .sub {
  color: #5b6577;
  margin-bottom: 22px;
  text-align: center;
}

.gef-db-ok {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.gef-db-bad {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.gef-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #646b72;
}

.gef-form-label .req {
  color: #e11d48;
  margin-left: 2px;
}

.gef-form-control {
  width: 100%;
  height: 38px;
  border: 1px solid #e6eaef;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  background: #ffffff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gef-form-control:focus {
  border-color: var(--gef-primary);
  box-shadow: 0 0 0 3px var(--gef-primary-soft);
  background: #ffffff;
}

.gef-form-control::placeholder {
  color: #9ca3af;
}

.gef-form-control:disabled,
.gef-form-control[readonly] {
  background: #f5f6f8;
  color: #6b7280;
}

select.gef-form-control {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.gef-form-group {
  margin-bottom: 14px;
}

.gef-auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #5b6577;
  line-height: 1.5;
}

@media (max-width: 991.98px) {
  .gef-auth {
    grid-template-columns: 1fr;
  }

  .gef-auth-visual {
    min-height: 260px;
    padding: 28px;
  }

  .gef-auth-visual h1,
  .gef-auth-audience h1 {
    font-size: 22px;
  }

  .gef-suite-groups {
    grid-template-columns: 1fr;
  }

  .gef-auth-logo {
    width: 140px;
    height: 140px;
  }
}

/* ---------- Utility ---------- */
.g-3 > * {
  margin-bottom: 1rem;
}

.text-muted-gef {
  color: var(--gef-text-muted) !important;
}

.link-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--gef-primary);
}

/* ---------- Setup CRUD ---------- */
.gef-alert-success {
  background: rgba(26, 79, 156, 0.1);
  color: var(--gef-primary-dark);
  border: 1px solid rgba(26, 79, 156, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 13px;
}

.gef-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.gef-form-grid .full {
  grid-column: 1 / -1;
}

.gef-form-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}

.gef-form-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gef-form-sections-stack > div {
  width: 100%;
}

.gef-form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f5;
}

.gef-input-icon {
  position: relative;
}

.gef-input-icon .gef-form-control {
  padding-right: 36px;
}

.gef-input-icon .gef-input-icon-left .gef-form-control,
.gef-input-icon.has-left .gef-form-control {
  padding-left: 36px;
  padding-right: 12px;
}

.gef-input-icon > i,
.gef-input-icon > svg {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #9ca3af;
  pointer-events: none;
}

.gef-input-icon.has-left > i,
.gef-input-icon.has-left > svg {
  left: 11px;
  right: auto;
}

.gef-upload-box {
  border: 1px dashed #d5dbe3;
  border-radius: 8px;
  background: #fafbfc;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  position: relative;
}

.gef-upload-box:hover {
  border-color: var(--gef-primary);
  background: #f8fafc;
}

.gef-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gef-upload-box i,
.gef-upload-box svg {
  width: 28px;
  height: 28px;
  color: #9ca3af;
}

.gef-upload-box p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.gef-upload-box p span {
  color: var(--gef-primary);
  font-weight: 600;
}

.gef-upload-box-sm {
  min-height: 96px;
  padding: 12px;
}

.gef-upload-box-sm i,
.gef-upload-box-sm svg {
  width: 22px;
  height: 22px;
}

.gef-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-gef-webcam {
  background: #1a4f9c;
  color: #fff;
  border: 1px solid #164687;
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(26, 79, 156, 0.22);
}

.btn-gef-webcam:hover {
  background: #123a75;
  border-color: #0f3266;
  color: #fff;
  box-shadow: 0 2px 6px rgba(18, 58, 117, 0.28);
}

.btn-gef-webcam:focus-visible {
  outline: 2px solid rgba(26, 79, 156, 0.35);
  outline-offset: 2px;
}

.btn-gef-webcam i,
.btn-gef-webcam svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.25;
}

.gef-item-edit-modal .modal-header {
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--gef-border);
  padding: 16px 20px;
}

.gef-item-edit-modal .modal-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--gef-text);
}

.gef-item-edit-modal .modal-body {
  padding: 16px 20px 8px;
}

.gef-item-edit-modal .gef-modal-form-footer {
  position: sticky;
  bottom: 0;
  background: var(--gef-surface);
  margin: 12px -20px 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--gef-border);
  z-index: 2;
}

.gef-item-edit-modal .gef-webcam-modal {
  z-index: 1100;
}

@media (max-width: 991.98px) {
  .gef-item-edit-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

.gef-webcam-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.gef-webcam-modal[hidden] {
  display: none !important;
}

body.gef-webcam-open {
  overflow: hidden;
}

.gef-webcam-dialog {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.gef-webcam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.gef-webcam-body {
  padding: 16px;
  background: #0f172a;
}

.gef-webcam-body video {
  display: block;
  width: 100%;
  max-height: min(55vh, 420px);
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.gef-webcam-hint {
  margin-top: 10px !important;
  color: #cbd5e1 !important;
}

.gef-webcam-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
}

.gef-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}

.gef-doc-grid > div {
  min-width: 0;
}

@media (max-width: 991.98px) {
  .gef-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .gef-doc-grid {
    grid-template-columns: 1fr;
  }
}

.gef-upload-preview {
  max-height: 72px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
}

.gef-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
}

.gef-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.gef-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.gef-actions-inline {
  display: flex;
  gap: 6px;
}

.btn-gef-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-gef-danger:hover {
  background: #fecaca;
  color: #991b1b;
}

.gef-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--gef-text-muted);
}

@media (max-width: 991.98px) {
  .gef-form-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .gef-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact stock entry (Opening / large catalogs) */
.gef-page-head-sm {
  margin-bottom: 12px;
}

.gef-page-head-sm h1 {
  font-size: 20px;
}

.gef-page-head-sm p {
  font-size: 12px;
}

.gef-stock-entry {
  font-size: 13px;
}

.gef-form-grid-sm {
  gap: 12px;
}

.gef-stock-entry .gef-form-label {
  font-size: 11px;
  margin-bottom: 4px;
}

.gef-stock-entry .gef-form-control {
  font-size: 13px;
  padding: 7px 10px;
  min-height: 34px;
}

.gef-stock-addbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.gef-stock-addbar-filters {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  align-items: center;
}

.gef-stock-addbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--gef-text-muted);
}

.gef-stock-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.gef-stock-search i,
.gef-stock-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--gef-text-muted);
  pointer-events: none;
  z-index: 1;
}

.gef-stock-entry .gef-stock-search .gef-form-control,
.gef-stock-search input.gef-form-control {
  padding-left: 36px !important;
  width: 100%;
}

.gef-stock-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--gef-border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  max-height: 280px;
  overflow: auto;
}

.gef-suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.gef-suggest-item:hover {
  background: #f8fafc;
}

.gef-suggest-item strong {
  font-size: 13px;
  color: var(--gef-text);
}

.gef-suggest-item span,
.gef-suggest-empty {
  font-size: 11px;
  color: var(--gef-text-muted);
}

.gef-suggest-empty {
  padding: 12px;
}

.gef-stock-table-shell {
  border: 1px solid var(--gef-border);
  border-radius: 10px;
  overflow: auto;
  max-height: min(58vh, 560px);
  background: #fff;
}

.gef-table-compact {
  font-size: 12.5px;
  margin: 0;
}

.gef-table-compact thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #eef4fc 0%, #e4eef9 100%);
  color: #123a75;
  font-weight: 700;
  font-size: 11px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(26, 79, 156, 0.18);
}

.gef-table-compact td {
  padding: 6px 10px;
  vertical-align: middle;
}

.gef-table-compact .gef-form-control {
  font-size: 12.5px;
  padding: 5px 8px;
  min-height: 30px;
}

.gef-item-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}

.gef-item-cell strong {
  font-size: 12.5px;
  font-weight: 600;
}

.gef-item-cell span {
  font-size: 11px;
  color: var(--gef-text-muted);
}

.gef-stock-empty {
  padding: 28px 16px;
}

.gef-stock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.gef-stock-total {
  font-size: 13px;
  color: var(--gef-text-muted);
}

.gef-stock-total strong {
  color: var(--gef-text);
  font-size: 15px;
  margin-left: 4px;
}

[data-theme="dark"] .gef-stock-suggest,
.theme-dark .gef-stock-suggest {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .gef-suggest-item:hover,
.theme-dark .gef-suggest-item:hover {
  background: #1e293b;
}

[data-theme="dark"] .gef-stock-table-shell,
.theme-dark .gef-stock-table-shell {
  background: transparent;
}

[data-theme="dark"] .gef-table thead th,
.theme-dark .gef-table thead th,
[data-theme="dark"] .gef-table-compact thead th,
.theme-dark .gef-table-compact thead th {
  background: linear-gradient(180deg, #1e3a5f 0%, #172554 100%);
  color: #dbeafe;
  border-bottom-color: rgba(147, 197, 253, 0.25);
}

/* Compact list pages: filter + table in one card */
.gef-list-card {
  overflow: hidden;
}

.gef-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gef-border);
  background: #fafbfc;
}

.gef-filter-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.gef-filter-field {
  min-width: 0;
  width: 150px;
  flex: 0 1 150px;
  overflow: hidden;
}

.gef-filter-field-sm {
  width: 110px;
  flex: 0 1 110px;
}

.gef-filter-field .gef-search,
.gef-filter-field .gef-stock-search {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: none;
}

.gef-filter-field .gef-search .gef-form-control,
.gef-filter-field .gef-stock-search .gef-form-control,
.gef-filter-field .gef-stock-search input.gef-form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.gef-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.gef-filter-btn {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Two-row filter layout (Stock Ledger etc.) */
.gef-filter-bar-2row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px;
}

.gef-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.gef-filter-row-meta {
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--gef-border);
}

.gef-filter-bar-2row .gef-filter-field {
  width: 170px;
  flex: 1 1 170px;
  max-width: 240px;
  min-width: 150px;
}

.gef-filter-bar-2row .gef-filter-field-lg {
  width: 240px;
  flex: 1 1 220px;
  max-width: 320px;
  min-width: 180px;
  overflow: hidden;
}

.gef-filter-bar-2row .gef-filter-actions {
  margin-left: 0;
  padding-bottom: 0;
}

.gef-filter-bar-2row .gef-stock-search,
.gef-filter-bar-2row .gef-filter-field-lg .gef-stock-search,
.gef-filter-bar-2row .gef-filter-field-lg .gef-search {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  flex: none;
}

.gef-ledger-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--gef-text-muted);
}

.gef-ledger-stats strong {
  color: var(--gef-text);
}

@media (max-width: 991.98px) {
  .gef-filter-bar-2row .gef-filter-field,
  .gef-filter-bar-2row .gef-filter-field-lg {
    max-width: none;
  }
}

.gef-filter-field .gef-form-label {
  margin-bottom: 4px;
  font-size: 11px;
}

.gef-filter-field .gef-form-control {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.gef-filter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.gef-filter-meta .gef-stock-search {
  min-width: 200px;
  max-width: 260px;
}

.gef-check-inline {
  margin-top: 0;
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.gef-list-card .gef-table-wrap {
  max-height: none;
}

.gef-list-card .gef-empty {
  padding: 28px 16px;
}

.gef-list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--gef-border);
  background: #fff;
  flex-wrap: wrap;
}

.gef-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gef-page-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--gef-primary-soft);
  color: var(--gef-primary-dark);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(26, 79, 156, 0.16);
}

.btn-gef.disabled,
.btn-gef[disabled] {
  pointer-events: none;
  opacity: 0.55;
}

[data-theme="dark"] .gef-filter-bar,
.theme-dark .gef-filter-bar {
  background: #0f172a;
}

[data-theme="dark"] .gef-list-pagination,
.theme-dark .gef-list-pagination {
  background: #0f172a;
}

[data-theme="dark"] .gef-page-badge,
.theme-dark .gef-page-badge {
  background: rgba(91, 143, 219, 0.18);
  color: #dbeafe;
  border-color: rgba(147, 197, 253, 0.25);
}

@media (max-width: 1199.98px) {
  .gef-filter-fields {
    flex-wrap: wrap;
  }

  .gef-filter-field {
    width: 140px;
    flex: 0 1 140px;
  }

  .gef-filter-field-sm {
    width: 100px;
    flex: 0 1 100px;
  }
}

@media (max-width: 767.98px) {
  .gef-filter-fields {
    flex-wrap: wrap;
  }

  .gef-filter-field,
  .gef-filter-field-sm {
    width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
  }

  .gef-filter-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 4px;
  }
}

/* Stock Ledger professional badges */
.gef-ledger-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.gef-ledger-badge.ledger-opening {
  background: rgba(26, 79, 156, 0.12);
  color: #1a4f9c;
}

.gef-ledger-badge.ledger-adj {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.gef-ledger-badge.ledger-in {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.gef-ledger-badge.ledger-out {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.gef-ledger-badge.ledger-other {
  background: #f3f4f6;
  color: #4b5563;
}

.gef-perm-group {
  border: 1px solid var(--gef-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fafbfc;
}

.gef-perm-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #123a75;
  margin-bottom: 10px;
}

.gef-perm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gef-type-badge.type-rm {
  background: rgba(26, 79, 156, 0.12);
  color: #1a4f9c;
}

.gef-type-badge.type-fg {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.gef-type-badge.type-sfg {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.gef-type-badge.type-wip {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.gef-type-badge.type-con {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.gef-type-badge.type-spare {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.gef-type-badge.type-other {
  background: #f3f4f6;
  color: #4b5563;
}

.text-in {
  color: #15803d !important;
}

.text-out {
  color: #b91c1c !important;
}

#adjTable tr.is-changed td {
  background: rgba(26, 79, 156, 0.04);
}

#adjPager .gef-form-control {
  font-size: 12.5px;
}

/* —— Live order tracking board —— */
.gef-track-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gef-track-kpi {
  background: var(--gef-card, #fff);
  border: 1px solid var(--gef-border, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gef-track-kpi strong { font-size: 1.5rem; }
.gef-track-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.gef-track-col {
  min-width: 220px;
  max-width: 240px;
  flex: 0 0 220px;
  background: var(--gef-surface-2, #f8fafc);
  border: 1px solid var(--gef-border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
}
.gef-track-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gef-border, #e5e7eb);
  font-size: 13px;
}
.gef-track-count {
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 0 8px;
}
.gef-track-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  max-height: 70vh;
  overflow-y: auto;
}
.gef-track-card {
  position: relative;
  display: block;
  background: var(--gef-card, #fff);
  border: 1px solid var(--gef-border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.gef-track-card:hover { border-color: var(--gef-primary, #1a4f9c); }
.gef-track-card-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}
.gef-track-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  padding: 20px 0;
}
.gef-track-card-active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}
.gef-track-card-ready {
  border-color: #10b981;
}
.gef-track-card-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 10px;
  animation: gef-pulse-border 1.6s ease-in-out infinite;
}
.gef-track-card-active .gef-track-card-pulse {
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.55);
}
.gef-track-card-ready .gef-track-card-pulse {
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.55);
  animation-name: gef-pulse-border-green;
}
@keyframes gef-pulse-border {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes gef-pulse-border-green {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.gef-blink-text {
  animation: gef-blink 1.4s ease-in-out infinite;
  color: #b45309;
}
.gef-blink-badge {
  animation: gef-blink 1.4s ease-in-out infinite;
}
@keyframes gef-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.gef-row-active td {
  background: rgba(245, 158, 11, 0.08);
}
.gef-track-col[data-color="amber"] .gef-track-col-head { border-top: 3px solid #f59e0b; }
.gef-track-col[data-color="slate"] .gef-track-col-head { border-top: 3px solid #64748b; }
.gef-track-col[data-color="blue"] .gef-track-col-head { border-top: 3px solid #3b82f6; }
.gef-track-col[data-color="indigo"] .gef-track-col-head { border-top: 3px solid #6366f1; }
.gef-track-col[data-color="rose"] .gef-track-col-head { border-top: 3px solid #f43f5e; }
.gef-track-col[data-color="violet"] .gef-track-col-head { border-top: 3px solid #8b5cf6; }
.gef-track-col[data-color="emerald"] .gef-track-col-head { border-top: 3px solid #10b981; }
.gef-track-col[data-color="teal"] .gef-track-col-head { border-top: 3px solid #14b8a6; }
@media (max-width: 768px) {
  .gef-track-kpis { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- Owner Platform Shell ---------- */
.owner-shell .owner-sidebar {
  background: linear-gradient(180deg, #0b1f3a 0%, #123a75 42%, #1a4f9c 100%);
  border-right: none;
  color: #e8eef8;
  box-shadow: 4px 0 24px rgba(11, 31, 58, 0.18);
}

.owner-shell .owner-sidebar-brand {
  height: auto;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  gap: 12px;
}

.owner-shell .owner-brand-logo-wrap {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 2px;
  flex-shrink: 0;
}

.owner-shell .owner-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.owner-shell .owner-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.owner-shell .owner-brand-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.owner-shell .owner-brand-copy small {
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.owner-shell .owner-sidebar .gef-nav-label {
  color: rgba(226, 232, 240, 0.55);
}

.owner-shell .owner-sidebar .gef-nav-link {
  color: rgba(241, 245, 249, 0.88);
}

.owner-shell .owner-sidebar .gef-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.owner-shell .owner-sidebar .gef-nav-link.active,
.owner-shell .owner-sidebar .gef-nav-link:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.owner-shell .owner-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.owner-shell .owner-footer-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.55);
  margin-bottom: 2px;
}

.owner-shell .owner-footer-company strong {
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: block;
  line-height: 1.3;
}

.owner-shell .owner-footer-meta {
  display: flex;
  flex-direction: column;
}

.owner-shell .owner-app-code {
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.owner-shell .owner-topbar {
  background: linear-gradient(90deg, #ffffff 0%, #f3f7fd 55%, #eaf2ff 100%);
  border-bottom: 1px solid #d7e3f4;
  box-shadow: 0 4px 18px rgba(18, 58, 117, 0.06);
  padding: 0 22px;
  min-height: 68px;
  height: auto;
}

.owner-shell .owner-topbar-company {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.owner-shell .owner-topbar-logo {
  width: 148px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  padding: 2px 6px;
  box-shadow: none;
}

.owner-shell .owner-topbar-company-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.owner-shell .owner-topbar-company-text strong {
  font-size: 14px;
  color: #123a75;
  font-weight: 750;
}

.owner-shell .owner-topbar-company-text small {
  font-size: 11px;
  color: #64748b;
}

.owner-shell .owner-topbar-company-text small span {
  color: #1a4f9c;
  font-weight: 700;
}

.owner-shell .owner-topbar-divider {
  width: 1px;
  height: 34px;
  background: #d5e2f2;
  margin: 0 8px 0 4px;
  flex-shrink: 0;
}

.owner-shell .owner-topbar-page {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.owner-shell .owner-topbar-page-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.owner-shell .owner-topbar-page strong {
  font-size: 15px;
  color: #0f172a;
  font-weight: 700;
}

.owner-shell .owner-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(26, 79, 156, 0.1);
  color: #1a4f9c;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid rgba(26, 79, 156, 0.16);
}

.owner-shell .owner-user-chip {
  border: 1px solid #d7e3f4;
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 58, 117, 0.06);
}

@media (max-width: 900px) {
  .owner-shell .owner-topbar-divider,
  .owner-shell .owner-topbar-page,
  .owner-shell .owner-topbar-pill {
    display: none;
  }
}
