/*
  NewAppUI App (TradeBotX-inspired)
  ------------------------------------------------------------
  Global dashboard / onboarding / header / menu / charts skin
  for Shemify. This file intentionally loads after pro_ui.css,
  newappui_auth.css, and newappui_superadmin.css so it can:
  - remove outer margins and restore full-width app layout
  - upgrade the header, sidebar, surfaces, and chart wrappers
  - keep existing functionality intact while using the new UI
*/

:root{
  /* Shemify website brand */
  --brand-red: #A93E17;
  --brand-blue: #15399A;
  --brand-red-rgb: 169, 62, 23;
  --brand-blue-rgb: 21, 57, 154;

  --brand-gradient: linear-gradient(to right, var(--brand-red) 0%, var(--brand-blue) 50%, var(--brand-red) 100%);
  --brand-gradient-flat: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-blue) 100%);

  /* Accent system (maps to brand) */
  --accent: var(--brand-blue);
  --accent-2: var(--brand-red);
  --accent-soft: rgba(var(--brand-blue-rgb), 0.12);
  --accent-strong: rgba(var(--brand-blue-rgb), 0.22);
  --danger: var(--brand-red);

  --bg: #f8fafc;
  --bg-alt: #eef2ff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-2: rgba(255, 255, 255, 0.76);
  --surface-3: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.26);
  --border-strong: rgba(100, 116, 139, 0.40);
  --focus: rgba(var(--brand-blue-rgb), 0.20);

  --chart-grid: rgba(148, 163, 184, 0.18);
  --chart-tick: #64748b;
  --chart-tooltip-bg: rgba(255, 255, 255, 0.96);

  --shadow-soft: 0 14px 42px rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 72px rgba(15, 23, 42, 0.11);
  --glass: rgba(255, 255, 255, 0.84);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --glass-dark: rgba(248, 250, 252, 0.72);

  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-xs: 12px;

  --nui-header-height: 84px;
  --nui-sidebar-width: 280px;
  --nui-sidebar-collapsed-width: 92px;
}

html[data-theme="dark"]{
  /* Keep brand colors identical in dark mode */
  --brand-red: #A93E17;
  --brand-blue: #15399A;
  --brand-red-rgb: 169, 62, 23;
  --brand-blue-rgb: 21, 57, 154;

  --brand-gradient: linear-gradient(to right, var(--brand-red) 0%, var(--brand-blue) 50%, var(--brand-red) 100%);
  --brand-gradient-flat: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-blue) 100%);

  --accent: var(--brand-blue);
  --accent-2: var(--brand-red);
  --accent-soft: rgba(var(--brand-blue-rgb), 0.18);
  --accent-strong: rgba(var(--brand-blue-rgb), 0.30);
  --danger: var(--brand-red);

  /* Website-like dark foundation */
  --bg: #060606;
  --bg-alt: #0A0A0A;
  --surface: rgba(10, 10, 10, 0.94);
  --surface-2: rgba(10, 10, 10, 0.76);
  --surface-3: rgba(10, 10, 10, 0.58);
  --text: #ffffff;
  --muted: #A7AABB;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --focus: rgba(var(--brand-blue-rgb), 0.28);

  --chart-grid: rgba(255, 255, 255, 0.12);
  --chart-tick: #A7AABB;
  --chart-tooltip-bg: rgba(10, 10, 10, 0.98);

  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.44);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.64);
  --glass: rgba(10, 10, 10, 0.78);
  --glass-strong: rgba(10, 10, 10, 0.92);
  --glass-dark: rgba(10, 10, 10, 0.66);
}

body{
  background:
    radial-gradient(1100px 540px at 18% -10%, rgba(var(--brand-red-rgb), 0.16), transparent 58%),
    radial-gradient(900px 520px at 96% 0%, rgba(var(--brand-blue-rgb), 0.18), transparent 52%),
    linear-gradient(180deg, var(--bg), var(--bg-alt)) !important;
  color: var(--text);
}

body[data-app-view="dashboard"],
body[data-app-view="superadmin"],
body[data-app-view="onboarding"]{
  min-height: 100vh;
}

body[data-app-view="dashboard"] #app,
body[data-app-view="superadmin"] #app,
body[data-app-view="onboarding"] #app{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-app-view="dashboard"] #main-content,
body[data-app-view="superadmin"] #main-content,
body[data-app-view="onboarding"] #main-content{
  min-height: calc(100vh - var(--nui-header-height));
  padding: 0 !important;
}

body[data-app-view="dashboard"] footer,
body[data-app-view="superadmin"] footer,
body[data-app-view="onboarding"] footer{
  display: none !important;
}

body[data-app-view="dashboard"] .skip-link,
body[data-app-view="superadmin"] .skip-link,
body[data-app-view="onboarding"] .skip-link{
  top: 8px;
  left: 8px;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                      */
/* -------------------------------------------------------------------------- */
header.app-header.nui-app-header,
header.app-header{
  position: sticky;
  top: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px !important;
  min-height: var(--nui-header-height);
  margin: 0 !important;
  background: var(--glass) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: visible;
}

header.app-header::before{
  content: "";
  position: absolute;
  inset: -60% auto auto -10%;
  width: 420px;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--brand-blue-rgb), 0.13) 0%, transparent 72%);
  filter: blur(24px);
}

header.app-header::after{
  content: "";
  position: absolute;
  right: -4%;
  top: -120px;
  width: 300px;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--brand-red-rgb), 0.12) 0%, transparent 74%);
  filter: blur(22px);
}

.app-header-left,
.app-header-center,
.app-header-right,
.header-actions{
  position: relative;
  z-index: 1;
}

.app-header-left,
.app-header-right,
.header-actions{
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header-right,
.header-actions{
  overflow: visible;
  isolation: isolate;
}

.app-header-center{
  min-width: 0;
  display: flex;
  justify-content: center;
}

header.app-header .brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

header.app-header .brand-mark{
  width: 46px !important;
  height: 46px !important;
  border-radius: 16px !important;
  background: var(--brand-gradient-flat) !important;
  color: #fff !important;
  box-shadow: 0 22px 44px -24px rgba(var(--brand-blue-rgb), 0.56) !important;
  font-weight: 900;
  font-size: 18px;
}

header.app-header .brand-text{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

header.app-header .brand-text-title{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text) !important;
}

header.app-header .brand-text-sub{
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted) !important;
}

header.app-header .tagline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(42vw, 560px);
  padding: 10px 14px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.52) !important;
  color: var(--muted) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px !important;
  line-height: 1.3;
}

html[data-theme="dark"] header.app-header .tagline{
  background: rgba(10, 10, 10, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

header.app-header .tagline span{
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nui-sidebar-toggle{
  width: 42px;
  height: 42px;
  border-radius: 14px !important;
}

.nui-sidebar-toggle .nui-sidebar-toggle-icon-close{ display: none; }
body.nav-open .nui-sidebar-toggle .nui-sidebar-toggle-icon-open{ display: none; }
body.nav-open .nui-sidebar-toggle .nui-sidebar-toggle-icon-close{ display: block; }

.nui-header-search{
  position: relative;
  width: min(100%, 680px);
}

.nui-header-search-icon,
.nui-search-results .nui-search-item-ico svg,
.nui-dropdown-item-ico svg,
.nui-menu-icon svg,
.nui-profile-caret svg,
.nui-dropdown-toggle svg,
.nui-quick-action svg{
  width: 18px;
  height: 18px;
  display: block;
}

.nui-header-search-icon{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

#nui-global-search-input{
  width: 100%;
  height: 48px;
  padding: 0 48px 0 44px !important;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(15, 23, 42, 0.04);
  font-size: 14px !important;
  color: var(--text) !important;
}

html[data-theme="dark"] #nui-global-search-input{
  background: rgba(15, 23, 42, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.14);
}

#nui-global-search-input:focus{
  outline: none;
  border-color: rgba(var(--brand-blue-rgb), 0.82) !important;
  box-shadow: 0 0 0 4px rgba(var(--brand-blue-rgb), 0.14), 0 20px 36px rgba(15, 23, 42, 0.10) !important;
}

.nui-search-kbd{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

html[data-theme="dark"] .nui-search-kbd{
  background: rgba(15, 23, 42, 0.72);
}

.nui-search-results{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  max-height: min(60vh, 480px);
  overflow: auto;
}

.nui-search-results[hidden]{
  display: none !important;
}

.nui-search-empty,
.nui-search-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.nui-search-item{
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nui-search-item:hover,
.nui-search-item:focus-visible{
  transform: translateY(-1px);
  background: rgba(var(--brand-blue-rgb), 0.08);
  border-color: rgba(var(--brand-blue-rgb), 0.18);
  box-shadow: 0 14px 28px -22px rgba(var(--brand-blue-rgb), 0.45);
  outline: none;
}

.nui-search-item-ico{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  background: rgba(var(--brand-blue-rgb), 0.10);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.nui-search-item-copy{
  min-width: 0;
  flex: 1 1 auto;
}

.nui-search-item-title{
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.nui-search-item-sub{
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nui-pill,
.nui-search-pill,
.nui-count-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nui-search-pill{
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--muted);
  text-transform: uppercase;
}

.nui-search-pill.is-locked{
  border-color: rgba(245, 158, 11, 0.30);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

html[data-theme="dark"] .nui-search-pill{
  background: rgba(10, 10, 10, 0.72);
}

.nui-live-indicator{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.26);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="dark"] .nui-live-indicator{
  color: #86efac;
  background: rgba(16, 185, 129, 0.16);
}

.nui-live-indicator .pulse-dot{
  width: 8px;
  height: 8px;
  background: currentColor;
  opacity: 0.92;
}

.nui-quick-action{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.22) !important;
  background: var(--brand-gradient) !important;
  background-size: 200% auto !important;
  background-position: left center !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 20px 46px -22px rgba(var(--brand-blue-rgb), 0.62) !important;
}

.nui-quick-action:hover{
  transform: translateY(-1px);
  box-shadow: 0 26px 54px -24px rgba(var(--brand-blue-rgb), 0.66) !important;
  background-position: right center !important;
}

.nui-dropdown-wrap{
  position: relative;
  z-index: 3;
  overflow: visible;
}

.nui-dropdown-toggle{
  position: relative;
}

.nui-count-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(135deg, var(--brand-red) 0%, rgba(var(--brand-red-rgb), 0.85) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(239, 68, 68, 0.56);
}

.nui-count-badge.hidden{
  display: none !important;
}

.nui-dropdown-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 240;
  min-width: 300px;
  max-width: min(90vw, 360px);
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nui-dropdown-menu[hidden]{
  display: none !important;
}

.nui-dropdown-head{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nui-dropdown-head-title{
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.nui-dropdown-head-sub{
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nui-dropdown-body{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 2px;
}

.nui-dropdown-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.nui-dropdown-item:hover,
.nui-dropdown-item:focus-visible{
  outline: none;
  background: rgba(var(--brand-blue-rgb), 0.08);
  border-color: rgba(var(--brand-blue-rgb), 0.18);
}

.nui-dropdown-item-ico{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  background: rgba(var(--brand-blue-rgb), 0.10);
  color: var(--accent);
}

.nui-dropdown-item-ico.success{
  border-color: rgba(16, 185, 129, 0.18);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.nui-dropdown-item-ico.warning{
  border-color: rgba(245, 158, 11, 0.20);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.nui-dropdown-item-ico.danger{
  border-color: rgba(239, 68, 68, 0.20);
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

html[data-theme="dark"] .nui-dropdown-item-ico.success{ color: #86efac; }
html[data-theme="dark"] .nui-dropdown-item-ico.warning{ color: #fcd34d; }
html[data-theme="dark"] .nui-dropdown-item-ico.danger{ color: #fca5a5; }

.nui-dropdown-item-copy{
  min-width: 0;
  flex: 1 1 auto;
}

.nui-dropdown-item-title{
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.nui-dropdown-item-sub{
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nui-profile-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 5px 8px 5px 5px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.54);
  color: inherit;
  cursor: pointer;
}

html[data-theme="dark"] .nui-profile-toggle{
  background: rgba(15, 23, 42, 0.60);
}

.nui-profile-toggle:hover{
  border-color: rgba(var(--brand-blue-rgb), 0.24);
  box-shadow: 0 14px 28px -22px rgba(var(--brand-blue-rgb), 0.40);
}

.nui-avatar{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--brand-gradient-flat);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 14px 32px -18px rgba(var(--brand-blue-rgb), 0.58);
}

.nui-profile-text{
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nui-profile-name{
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.nui-profile-subtitle{
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

.nui-profile-caret{
  color: var(--muted);
  flex: 0 0 auto;
}

.nui-profile-menu{
  min-width: 320px;
  z-index: 260;
}

.nui-profile-summary{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0 10px;
}

.nui-profile-summary .nui-avatar{
  width: 44px;
  height: 44px;
  border-radius: 16px;
}

body[data-app-view="auth"] .nui-sidebar-toggle,
body[data-app-view="auth"] .nui-header-search,
body[data-app-view="auth"] .nui-live-indicator,
body[data-app-view="auth"] .nui-quick-action,
body[data-app-view="auth"] #nui-notifications-wrap,
body[data-app-view="auth"] #nui-profile-wrap,
body[data-app-view="force-password"] .nui-sidebar-toggle,
body[data-app-view="force-password"] .nui-header-search,
body[data-app-view="force-password"] .nui-live-indicator,
body[data-app-view="force-password"] .nui-quick-action,
body[data-app-view="force-password"] #nui-notifications-wrap,
body[data-app-view="force-password"] #nui-profile-wrap,
body[data-app-view="onboarding"] .nui-header-search,
body[data-app-view="onboarding"] .nui-live-indicator,
body[data-app-view="onboarding"] #nui-notifications-wrap,
body[data-app-view="onboarding"] #nui-profile-wrap,
body[data-app-view="superadmin"] .nui-sidebar-toggle{
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Onboarding                                                                  */
/* -------------------------------------------------------------------------- */
#onboarding-section.card{
  position: relative;
  width: min(1360px, calc(100% - 40px));
  margin: 28px auto !important;
  padding: 28px !important;
  overflow: hidden;
  background: var(--glass) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#onboarding-section::before{
  content: "";
  position: absolute;
  inset: -34%;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 20%, rgba(var(--brand-blue-rgb), 0.18) 0, transparent 48%),
    radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.16) 0, transparent 42%),
    radial-gradient(circle at 72% 84%, rgba(169, 62, 23, 0.12) 0, transparent 46%);
  filter: blur(4px);
}

#onboarding-section > *{
  position: relative;
  z-index: 1;
}

#onboarding-section .onboarding-section-title,
#onboarding-section .plan-card-title,
#onboarding-section .plan-col-title{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
}

#onboarding-section .onboarding-section-title{
  margin: 0;
  font-size: 36px !important;
  line-height: 1.02;
  font-weight: 700 !important;
  color: var(--text) !important;
}

#onboarding-section .onboarding-step-kicker,
#onboarding-section .mini-tag{
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px !important;
  color: var(--muted) !important;
}

#onboarding-section .onboarding-subtitle,
#onboarding-section .card-subtitle,
#onboarding-section .plan-card-sub,
#onboarding-section .hint{
  color: var(--muted) !important;
}

#onboarding-section .plan-card,
#onboarding-section .plan-col,
#onboarding-section .plan-editor,
#onboarding-section .plans-surface,
#onboarding-section .plan-modal,
#onboarding-section .settings-content,
#onboarding-section .card{
  background: var(--glass-strong) !important;
  border: 1px solid var(--border) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow-soft) !important;
}

#onboarding-section .plan-card:hover{
  transform: translateY(-2px);
  border-color: rgba(var(--brand-blue-rgb), 0.24) !important;
}

#onboarding-section .plan-pill,
#onboarding-section .plan-badge,
#onboarding-section .plan-chip{
  border-radius: 999px !important;
}

/* -------------------------------------------------------------------------- */
/* Dashboard layout + sidebar                                                  */
/* -------------------------------------------------------------------------- */
#dashboard-section.card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#dashboard-section .dashboard-shell{
  display: grid;
  grid-template-columns: var(--nui-sidebar-width) minmax(0, 1fr) !important;
  gap: 0 !important;
  min-height: calc(100vh - var(--nui-header-height));
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.nui-sidebar-collapsed #dashboard-section .dashboard-shell{
  grid-template-columns: var(--nui-sidebar-collapsed-width) minmax(0, 1fr) !important;
}

#dashboard-section .sidebar{
  position: sticky;
  top: var(--nui-header-height);
  align-self: start;
  height: calc(100vh - var(--nui-header-height));
  padding: 18px 14px 22px !important;
  overflow: auto;
  background: var(--glass) !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#dashboard-section .sidebar::before{
  content: "";
  position: absolute;
  inset: -12% 0 auto 0;
  height: 240px;
  pointer-events: none;
  background: radial-gradient(circle at 24% 8%, rgba(var(--brand-blue-rgb), 0.14) 0, transparent 52%);
  filter: blur(18px);
}

#dashboard-section .sidebar > *{
  position: relative;
  z-index: 1;
}

#dashboard-section .sidebar-header{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 6px 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#dashboard-section .sidebar-title,
.nui-legacy-sidebar-title{
  display: none !important;
}

.nui-sidebar-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nui-sidebar-brand-mark{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--brand-gradient-flat);
  color: #fff;
  box-shadow: 0 20px 44px -22px rgba(var(--brand-blue-rgb), 0.58);
  font-size: 18px;
  font-weight: 900;
}

.nui-sidebar-brand-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nui-sidebar-brand-title{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nui-sidebar-brand-sub{
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nui-sidebar-status-row{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-chip,
.nui-workspace-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.18) !important;
  background: rgba(var(--brand-blue-rgb), 0.10) !important;
  color: var(--accent) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nui-workspace-pill{
  max-width: 100%;
  border-color: var(--border) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: var(--muted) !important;
}

.plan-chip.free{
  border-color: rgba(148, 163, 184, 0.26) !important;
  background: rgba(148, 163, 184, 0.10) !important;
  color: #475569 !important;
}

html[data-theme="dark"] .plan-chip.free{
  color: #cbd5e1 !important;
}

.location-switcher{
  margin: 0 6px 16px;
  padding: 14px !important;
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass-strong) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.location-switcher-top{
  align-items: center;
}

.location-switcher-label,
.location-switcher .settings-mini-note,
#location-switcher-status{
  color: var(--muted) !important;
}

.location-switcher-select{
  margin-top: 10px;
  height: 44px;
  border-radius: 14px !important;
}

.sidebar-search{
  margin: 0 6px 14px !important;
  padding: 0 12px !important;
  height: 44px;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

html[data-theme="dark"] .sidebar-search{
  background: rgba(15, 23, 42, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-search-input{
  height: auto !important;
  font-size: 13px !important;
}

#main-menu{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px 22px;
}

#main-menu .menu-item{
  list-style: none;
}

#main-menu .menu-section-title{
  list-style: none;
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

#main-menu .menu-button{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px !important;
  border-radius: 18px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

#main-menu .menu-button:hover{
  transform: translateY(-1px);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.56) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 16px 34px -24px rgba(15, 23, 42, 0.22);
}

html[data-theme="dark"] #main-menu .menu-button:hover{
  background: rgba(15, 23, 42, 0.58) !important;
}

#main-menu .menu-button.active{
  color: var(--text) !important;
  background: linear-gradient(135deg, rgba(var(--brand-blue-rgb), 0.16), rgba(16, 185, 129, 0.10)) !important;
  border-color: rgba(var(--brand-blue-rgb), 0.22) !important;
  box-shadow: 0 20px 40px -28px rgba(var(--brand-blue-rgb), 0.46);
}

#main-menu .menu-item.locked .menu-button{
  border-color: rgba(245, 158, 11, 0.18) !important;
}

#main-menu .menu-label{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#main-menu .menu-dot{
  display: none !important;
}

.nui-menu-icon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

#main-menu .menu-button:hover .nui-menu-icon,
#main-menu .menu-button.active .nui-menu-icon{
  color: var(--accent);
  background: rgba(var(--brand-blue-rgb), 0.10);
  border-color: rgba(var(--brand-blue-rgb), 0.16);
}

#main-menu .menu-label > span:last-child{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

#main-menu .menu-badge{
  width: 34px !important;
  height: 34px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.10) !important;
  color: var(--muted) !important;
  flex: 0 0 auto;
}

#main-menu .menu-badge svg{
  width: 16px;
  height: 16px;
}

#main-menu .menu-badge.premium{
  border-color: rgba(var(--brand-blue-rgb), 0.20);
  background: rgba(var(--brand-blue-rgb), 0.12) !important;
  color: var(--accent) !important;
}

#main-menu .menu-item.locked .menu-badge.premium{
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
}

#main-menu .menu-badge.help{
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0369a1 !important;
}

#main-menu .menu-badge.audit{
  background: rgba(148, 163, 184, 0.12) !important;
}

#main-menu .menu-badge.exit{
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar .nui-sidebar-brand-copy,
body.nui-sidebar-collapsed #dashboard-section .sidebar .nui-sidebar-status-row,
body.nui-sidebar-collapsed #dashboard-section .sidebar .location-switcher,
body.nui-sidebar-collapsed #dashboard-section .sidebar .sidebar-search,
body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu .menu-section-title,
body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu .menu-label > span:last-child,
body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu .menu-badge{
  display: none !important;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar .sidebar-header{
  align-items: center;
  padding-left: 0;
  padding-right: 0;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar .nui-sidebar-brand{
  justify-content: center;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu{
  padding-left: 0;
  padding-right: 0;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu .menu-button{
  justify-content: center;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar #main-menu .menu-label{
  justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* Dashboard content + shared surfaces                                         */
/* -------------------------------------------------------------------------- */
#dashboard-section .content{
  position: relative;
  min-width: 0 !important;
  padding: 24px 28px 34px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  min-height: calc(100vh - var(--nui-header-height));
}

#dashboard-section .content::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 2%, rgba(var(--brand-blue-rgb), 0.08) 0, transparent 32%),
    radial-gradient(circle at 6% 12%, rgba(16, 185, 129, 0.05) 0, transparent 36%);
}

#dashboard-section .content > *{
  position: relative;
  z-index: 1;
}

.content-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px !important;
  margin: 0 0 18px !important;
  border-radius: 26px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass-strong) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.welcome-text-main{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 34px !important;
  line-height: 1.02;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--text) !important;
}

.welcome-text-sub{
  margin-top: 6px;
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.55;
}

.topbar-actions{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.label-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, 0.70) !important;
  color: var(--muted) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

html[data-theme="dark"] .label-pill{
  background: rgba(15, 23, 42, 0.66) !important;
}

.content-tagline{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 22px;
  min-width: 0;
}

#current-page-title{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 30px !important;
  line-height: 1.06;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--text) !important;
}

#current-page-tagline{
  font-size: 13px !important;
  color: var(--muted) !important;
}

.content-placeholder,
#dashboard-section .page{
  margin: 0;
}

.card,
.dash-card,
.pos-panel,
.history-panel,
.reports-panel,
.debts-panel,
.settings-content,
.logs-card,
.shop-card,
.shop-analytics-card,
.support-card,
.webpage-card,
.loy-panel,
.gc-card,
.pro-card,
.pos-modal,
.history-modal,
.modal-card,
.support-modal,
.shop-order-modal-card,
.team2-emp-card,
.team-org-node,
.simple-list,
.summary-card,
.mini-card,
.reports-box,
.reports-mini-table,
.reports-kpi,
.reports-list,
.pos-table-card,
.history-table-wrap,
.history-summary,
.history-kv,
.gc-sheet-card,
.gc-template-item,
.settings-mini-table-wrapper,
.settings-subscription-summary,
.settings-subscription-details,
.settings-billing-history,
.settings-payouts-history,
.settings-payroll-totals,
.settings-payroll-deductions-wrap,
.settings-custom-role-box,
.shop-order-modal,
.shop-order-modal-head,
.shop-order-modal-foot,
.shop-order-modal-grid,
.card.webpage-card,
#support-page .card,
#support-page .support-card,
#support-page .support-modal,
.loy-shell .card,
.gc-shell .card{
  background: var(--glass-strong) !important;
  border: 1px solid var(--border) !important;
  border-radius: 24px !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn,
.btn-secondary,
.btn-primary,
.btn-danger,
.icon-btn,
.pos-icon-btn,
.settings-nav-btn,
.reports-tab,
.pos-tab,
.loy-tab,
.sa-page-tabs .btn,
.sa-mini-tabs .btn{
  border-radius: 14px !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover,
.btn-secondary:hover,
.btn-primary:hover,
.btn-danger:hover,
.icon-btn:hover,
.pos-icon-btn:hover,
.settings-nav-btn:hover,
.reports-tab:hover,
.pos-tab:hover,
.loy-tab:hover{
  transform: translateY(-1px);
}

.icon-btn,
.pos-icon-btn,
.btn-secondary,
.btn,
.reports-tab,
.pos-tab,
.loy-tab,
.settings-nav-btn{
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .pos-icon-btn,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .reports-tab,
html[data-theme="dark"] .pos-tab,
html[data-theme="dark"] .loy-tab,
html[data-theme="dark"] .settings-nav-btn{
  background: rgba(10, 10, 10, 0.72) !important;
}

.btn-primary,
button.btn-primary,
#header-upgrade-btn,
[data-upgrade-to-premium="true"]{
  color: #fff !important;
  border-color: rgba(var(--brand-blue-rgb), 0.24) !important;
  background: var(--brand-gradient) !important;
  background-size: 200% auto !important;
  background-position: left center !important;
  box-shadow: 0 22px 42px -22px rgba(var(--brand-blue-rgb), 0.58) !important;
}

.btn-primary:hover,
#header-upgrade-btn:hover,
[data-upgrade-to-premium="true"]:hover{
  background-position: right center !important;
  box-shadow: 0 28px 54px -24px rgba(var(--brand-blue-rgb), 0.66) !important;
}

/* POS checkout button — solid brand-blue for the #1 action in the app */
#pos-checkout-btn{
  background: var(--brand-blue) !important;
  background-image: none !important;
  background-size: auto !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 14px 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 8px 24px -6px rgba(var(--brand-blue-rgb), 0.45) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease !important;
}
#pos-checkout-btn:hover{
  background: #1a4fc7 !important;
  background-image: none !important;
  box-shadow: 0 12px 32px -6px rgba(var(--brand-blue-rgb), 0.58) !important;
  transform: translateY(-1px) !important;
}
#pos-checkout-btn:active{
  transform: translateY(0) !important;
  box-shadow: 0 4px 12px -4px rgba(var(--brand-blue-rgb), 0.30) !important;
}

.btn-danger,
button.btn-danger{
  color: #fff !important;
  border-color: rgba(var(--brand-red-rgb), 0.28) !important;
  background: linear-gradient(135deg, var(--brand-red) 0%, #7c2d12 100%) !important;
  box-shadow: 0 18px 38px -22px rgba(var(--brand-red-rgb), 0.58) !important;
}

/* Solid brand blue secondary button (website palette) */
.btn-secondary,
button.btn-secondary{
  color: #fff !important;
  border-color: rgba(var(--brand-blue-rgb), 0.26) !important;
  background: rgba(var(--brand-blue-rgb), 0.86) !important;
  box-shadow: 0 18px 38px -26px rgba(var(--brand-blue-rgb), 0.56) !important;
}

.btn-secondary:hover,
button.btn-secondary:hover{
  background: rgba(var(--brand-blue-rgb), 0.94) !important;
  box-shadow: 0 22px 44px -26px rgba(var(--brand-blue-rgb), 0.66) !important;
}

.field-group label,
.settings-section-subtitle,
.settings-subsection-note,
.pos-mini,
.card-subtitle,
.hint,
.text-muted,
.settings-mini-note,
.logs-footer,
.logs-row-meta,
.history-detail-sub,
.reports-item-meta,
.gc-template-meta,
.shop-prod-meta,
.shop-cust-meta,
.shop-order-meta,
.shop-check-hint,
.team2-emp-sub,
.team-tag,
.webpage-subtitle,
.webpage-title + div,
.history-item-meta,
.debts-item-meta,
.dash-sub,
.dash-kpi-label,
.dash-stat-label,
.card-desc{
  color: var(--muted) !important;
}

#dashboard-section input,
#dashboard-section select,
#dashboard-section textarea,
#onboarding-section input,
#onboarding-section select,
#onboarding-section textarea,
.modal input,
.modal select,
.modal textarea,
.support-modal input,
.support-modal textarea,
.shop-order-modal input,
.shop-order-modal textarea{
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 14px !important;
}

html[data-theme="dark"] #dashboard-section input,
html[data-theme="dark"] #dashboard-section select,
html[data-theme="dark"] #dashboard-section textarea,
html[data-theme="dark"] #onboarding-section input,
html[data-theme="dark"] #onboarding-section select,
html[data-theme="dark"] #onboarding-section textarea,
html[data-theme="dark"] .modal input,
html[data-theme="dark"] .modal select,
html[data-theme="dark"] .modal textarea,
html[data-theme="dark"] .support-modal input,
html[data-theme="dark"] .support-modal textarea,
html[data-theme="dark"] .shop-order-modal input,
html[data-theme="dark"] .shop-order-modal textarea{
  background: rgba(15, 23, 42, 0.74) !important;
}

#dashboard-section input:focus,
#dashboard-section select:focus,
#dashboard-section textarea:focus,
#onboarding-section input:focus,
#onboarding-section select:focus,
#onboarding-section textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus{
  border-color: rgba(var(--brand-blue-rgb), 0.82) !important;
  box-shadow: 0 0 0 4px rgba(var(--brand-blue-rgb), 0.16) !important;
}

table,
.settings-table,
.logs-table,
.history-table,
.reports-mini-table,
.loy-table-wrap table,
.gc-table-wrap table,
.admin-table-wrapper table,
.admin-table,
.table{
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100%;
}

.table,
.logs-table,
.history-table-wrap,
.gc-table-wrap,
.loy-table-wrap,
.admin-table-wrapper,
.settings-mini-table-wrapper{
  overflow: auto;
  border-radius: 22px !important;
}

th,
.table th,
.logs-table th,
.history-table th,
.reports-mini-table th,
.gc-table-wrap th,
.loy-table-wrap th,
.admin-table th,
.settings-table th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--muted) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 11px !important;
  letter-spacing: 0.12em;
}

html[data-theme="dark"] th,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .logs-table th,
html[data-theme="dark"] .history-table th,
html[data-theme="dark"] .reports-mini-table th,
html[data-theme="dark"] .gc-table-wrap th,
html[data-theme="dark"] .loy-table-wrap th,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .settings-table th{
  background: rgba(15, 23, 42, 0.86) !important;
}

tr:hover td,
.history-item:hover,
.reports-item:hover,
.logs-row:hover,
.gc-template-item:hover,
.shop-order-row:hover,
.shop-prod-row:hover,
.shop-cust-row:hover,
.team-list-item:hover,
.debts-item:hover,
.pos-product:hover,
.pos-biz-list-item:hover,
.pos-cart-item:hover,
.history-item.active,
.reports-item.active,
.debts-item.active,
.gc-batch-item:hover{
  background: rgba(var(--brand-blue-rgb), 0.06) !important;
}

/* -------------------------------------------------------------------------- */
/* Charts                                                                      */
/* -------------------------------------------------------------------------- */
.dash-chart-box,
.reports-chart-canvas,
.dash-canvas-wrap,
.shop-analytics-card canvas,
#dashboard-section canvas,
#reports-page canvas{
  position: relative;
}

.dash-chart-box,
.reports-chart-canvas,
.shop-analytics-card,
.dash-prod,
.dash-list,
.reports-box,
.reports-kpi,
.reports-list{
  overflow: hidden;
}

.dash-chart-box::before,
.reports-chart-canvas::before,
.shop-analytics-card::before{
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 3px;
  width: 100%;
  background: var(--brand-gradient-flat);
  opacity: 0.86;
  pointer-events: none;
}

.dash-chart-toolbar,
.dash-stats-row,
.logs-toolbar,
.support-head,
.shop2-topbar,
.team2-topbar,
.webpage-topbar,
.debts-topbar,
.gc-head,
.loy-head,
.settings-section-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.dash-card-title,
.dash-list-title,
.webpage-title,
.support-method-title,
.logs-actions-label,
.shop-card-title,
.team2-emp-name,
.gc-template-name,
.loy-panel .card-title,
.settings-section-title,
.settings-subsection-title,
.history-detail-title,
.logs-action-name,
.dash-li-title{
  color: var(--text) !important;
}

.dash-wrap,
.logs-wrap,
.gc-shell,
.loy-shell,
.shop2-layout,
.team2-shell,
.support-grid,
.webpage-grid,
.history-layout,
.reports-layout,
.dash-grid-2,
.shop-analytics-grid,
.support-contact-grid,
.shop-order-modal-grid{
  gap: 18px !important;
}

.dash-kpi-grid,
.shop-analytics-grid,
.settings-grid-2,
.settings-grid-3,
.dash-chart-grid,
.debt-detail-cards,
.gc-batch-actions{
  gap: 14px !important;
}

.dash-kpi,
.dash-stat,
.shop-analytics-card,
.summary-card,
.mini-card,
.pos-pay-card,
.pos-pay-mini,
.support-method,
.logs-quick,
.logs-pill,
.gc-preset,
.gc-colorfield,
.loy-nav,
.loy-panel,
.team-tag,
.shop-badge,
.pos-badge,
.mini-tag,
.pill,
.logs-action-chip,
.settings-nav-tag{
  border-radius: 16px !important;
}

.dash-kpi,
.dash-stat,
.summary-card,
.mini-card,
.pos-pay-card,
.support-method,
.logs-quick,
.gc-preset,
.loy-nav,
.loy-panel,
.logs-action-chip,
.settings-nav-tag,
.shop-badge,
.pos-badge,
.mini-tag,
.pill{
  background: rgba(255, 255, 255, 0.66) !important;
  border: 1px solid var(--border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
}

html[data-theme="dark"] .dash-kpi,
html[data-theme="dark"] .dash-stat,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .pos-pay-card,
html[data-theme="dark"] .support-method,
html[data-theme="dark"] .logs-quick,
html[data-theme="dark"] .gc-preset,
html[data-theme="dark"] .loy-nav,
html[data-theme="dark"] .loy-panel,
html[data-theme="dark"] .logs-action-chip,
html[data-theme="dark"] .settings-nav-tag,
html[data-theme="dark"] .shop-badge,
html[data-theme="dark"] .pos-badge,
html[data-theme="dark"] .mini-tag,
html[data-theme="dark"] .pill{
  background: rgba(15, 23, 42, 0.66) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.dash-kpi-value,
.dash-stat-value,
.shop-analytics-num,
.history-amount,
.reports-amount,
.logs-count,
.gc-sys-code,
.pos-product-price,
.pos-tip-amount,
#pos-altid-cust-points,
#pos-altid-cust-worth,
.plan-price,
.plan-value,
.settings-payroll-gross,
.settings-payroll-bonus,
.settings-payroll-extra,
.settings-payroll-ded-amt{
  color: var(--text) !important;
}

/* POS */
.pos-product,
.pos-cart-item,
.pos-biz-list-item,
.pos-checkout-item,
.menu-item-main,
.menu-item,
.pos-altid-list-item,
.pos-product-media,
.pos-product-body,
.pos-product-footer,
.cart-summary{
  border-radius: 20px !important;
}

.pos-product-media,
.pos-cart-thumb,
.pos-cart-thumb-fallback{
  border-radius: 16px !important;
}

.pos-add-btn,
.pos-remove-btn,
.pos-qty-btn,
.pos-fav-btn{
  border-radius: 12px !important;
}

/* History / reports */
.history-item,
.reports-item,
.debts-item,
.logs-card .logs-row,
.team-list-item,
.gc-batch-item,
.shop-order-row,
.shop-prod-row,
.shop-cust-row{
  border-radius: 18px !important;
  border: 1px solid transparent !important;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.history-item.active,
.reports-item.active,
.debts-item.active,
.logs-action-chip.active,
.settings-nav-btn.active,
.pos-tab.active,
.reports-tab.active,
.loy-tab.active{
  border-color: rgba(var(--brand-blue-rgb), 0.24) !important;
  background: rgba(var(--brand-blue-rgb), 0.10) !important;
  box-shadow: 0 16px 34px -26px rgba(var(--brand-blue-rgb), 0.40) !important;
}

/* Settings */
.settings-layout,
.settings-ops-wrap,
.settings-nav,
.settings-content,
.settings-list{
  gap: 16px !important;
}

.settings-nav-btn{
  justify-content: flex-start !important;
  padding: 12px 14px !important;
}

.settings-nav-title{
  color: var(--text) !important;
}

/* Team / Shop / Support / Loyalty / Gift cards / Logs */
.team2-topbar,
.shop2-topbar,
.webpage-topbar,
.debts-topbar,
.gc-head,
.loy-head,
.logs-toolbar,
.support-head{
  margin-bottom: 16px;
}

.team2-empty,
.logs-empty,
.history-detail-empty,
.reports-detail-empty,
.pos-cart-empty,
.settings-coupons-empty,
.gc-print-instructions,
.support-card .empty,
#support-kb-suggested,
#support-suggestions,
#support-status,
#support-diagnostics-used{
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px dashed rgba(148, 163, 184, 0.36) !important;
}

html[data-theme="dark"] .team2-empty,
html[data-theme="dark"] .logs-empty,
html[data-theme="dark"] .history-detail-empty,
html[data-theme="dark"] .reports-detail-empty,
html[data-theme="dark"] .pos-cart-empty,
html[data-theme="dark"] .settings-coupons-empty,
html[data-theme="dark"] .gc-print-instructions,
html[data-theme="dark"] .support-card .empty,
html[data-theme="dark"] #support-kb-suggested,
html[data-theme="dark"] #support-suggestions,
html[data-theme="dark"] #support-status,
html[data-theme="dark"] #support-diagnostics-used{
  background: rgba(15, 23, 42, 0.56) !important;
}

/* Command palette + overlays */
.cmdk-modal,
.modal,
.pos-modal-backdrop,
.history-modal-backdrop,
.mobile-nav-overlay,
.plan-modal-backdrop{
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html[data-theme="dark"] .cmdk-modal,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .pos-modal-backdrop,
html[data-theme="dark"] .history-modal-backdrop,
html[data-theme="dark"] .mobile-nav-overlay,
html[data-theme="dark"] .plan-modal-backdrop{
  background: rgba(0, 0, 0, 0.58) !important;
}

.cmdk-card{
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass-strong) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.cmdk-item{
  border-radius: 16px !important;
}

.cmdk-item:hover,
.cmdk-item[aria-selected="true"]{
  background: rgba(var(--brand-blue-rgb), 0.08) !important;
}

/* Support widget */
#sw-launcher{
  border-radius: 18px !important;
  box-shadow: 0 24px 50px -24px rgba(var(--brand-blue-rgb), 0.60) !important;
}

#sw-popup{
  border-radius: 28px !important;
  overflow: hidden;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sw-head,
.sw-foot{
  border-color: var(--border) !important;
}

.sw-bubble{
  border-radius: 18px !important;
}

/* -------------------------------------------------------------------------- */
/* Super admin full-width fix                                                  */
/* -------------------------------------------------------------------------- */
body[data-app-view="superadmin"] #superadmin-section.nui-superadmin{
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - var(--nui-header-height));
  margin: 0 !important;
  padding: 24px !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */
@media (max-width: 1280px){
  header.app-header{
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  header.app-header .tagline{
    max-width: min(32vw, 340px);
  }
}

@media (max-width: 960px){
  :root{
    --nui-header-height: 74px;
  }

  body.nui-sidebar-collapsed #dashboard-section .dashboard-shell{
    grid-template-columns: minmax(0, 1fr) !important;
  }

  header.app-header{
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 14px !important;
  }

  header.app-header .brand-text-sub,
  header.app-header .tagline,
  .nui-live-indicator,
  .nui-quick-action-label,
  .nui-profile-subtitle,
  .nui-search-kbd,
  .nui-header-search{
    display: none !important;
  }

  header.app-header .brand-mark{
    width: 40px !important;
    height: 40px !important;
  }

  header.app-header .brand-text-title{
    font-size: 22px !important;
  }

  .nui-profile-toggle{
    max-width: none;
    padding-right: 5px;
  }

  .nui-profile-text,
  .nui-profile-caret{
    display: none !important;
  }

  #dashboard-section .dashboard-shell{
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboard-section .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(330px, 86vw);
    z-index: 120;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
    border-right: 1px solid var(--border) !important;
  }

  body.nav-open #dashboard-section .sidebar{
    transform: translateX(0);
  }

  #dashboard-section .content{
    padding: 18px 14px 24px !important;
  }

  .content-header{
    padding: 16px 16px !important;
    border-radius: 22px !important;
  }

  .welcome-text-main{
    font-size: 28px !important;
  }

  .content-tagline{
    margin-bottom: 18px;
  }

  #current-page-title{
    font-size: 26px !important;
  }

  #onboarding-section.card{
    width: calc(100% - 24px);
    margin: 12px auto 20px !important;
    padding: 20px !important;
  }

  body[data-app-view="superadmin"] #superadmin-section.nui-superadmin{
    padding: 18px !important;
  }

  .nui-dropdown-menu,
  .nui-profile-menu{
    right: -6px;
    min-width: min(92vw, 340px);
  }
}

@media (max-width: 640px){
  header.app-header .brand-text-title{
    font-size: 20px !important;
  }

  .content-header{
    flex-direction: column;
    align-items: stretch;
  }

  .welcome-text-main{
    font-size: 26px !important;
  }

  .label-pill,
  .topbar-actions{
    align-self: flex-start;
  }

  #current-page-title{
    font-size: 24px !important;
  }

  body[data-app-view="superadmin"] #superadmin-section.nui-superadmin{
    padding: 14px !important;
  }
}


/* -------------------------------------------------------------------------- */
/* New UI polish fixes (logo, menu icons, scrollbars, page surfaces, charts)   */
/* -------------------------------------------------------------------------- */

/* Dashboard header: logo appears only once (sidebar), matching template. */
body[data-app-view="dashboard"] header.app-header .brand,
body[data-app-view="dashboard"] header.app-header .tagline{
  display: none !important;
}

/* Sidebar menu: remove legacy right-side icon badges; keep only text pills (e.g. PRO). */
#main-menu .menu-badge{
  display: none !important;
}

#main-menu .menu-badge.nui-text-badge{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 26px !important;
  width: auto !important;
  min-width: 46px;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}

#main-menu .menu-badge.nui-text-badge svg{
  display: none !important;
}

/* Sidebar/menu scrollbar (matches NewAppUI template) */
#dashboard-section .sidebar{
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.46) transparent;
}

#dashboard-section .sidebar::-webkit-scrollbar{
  width: 6px;
  height: 6px;
}

#dashboard-section .sidebar::-webkit-scrollbar-track{
  background: transparent;
}

#dashboard-section .sidebar::-webkit-scrollbar-thumb{
  background: rgba(148, 163, 184, 0.34);
  border-radius: 10px;
}

html[data-theme="dark"] #dashboard-section .sidebar{
  scrollbar-color: rgba(100, 116, 139, 0.62) transparent;
}

html[data-theme="dark"] #dashboard-section .sidebar::-webkit-scrollbar-thumb{
  background: rgba(100, 116, 139, 0.56);
}

#dashboard-section .sidebar::-webkit-scrollbar-thumb:hover{
  background: rgba(100, 116, 139, 0.76);
}

/* Page wrappers: ensure tabs feel like the new UI (no legacy panel backgrounds) */
#dashboard-section .pos-page,
#dashboard-section .history-page,
#dashboard-section .reports-page,
#dashboard-section .debts-page,
#dashboard-section .settings-page,
#dashboard-section #shop-page{
  background: transparent !important;
}

/* Topbars / headers inside tabs (new UI glass surface) */
.pos-mobile-tabs,
.pos-bizmode-tabs,
.pos-active-order-banner,
.history-topbar,
.reports-topbar,
.debts-topbar,
.shop-admin-topbar,
.team2-topbar,
.webpage-topbar,
.logs-toolbar,
.support-head,
.gc-head,
.loy-head{
  border-radius: 26px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass-strong) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px 16px !important;
}

/* POS (Tables/Appointments/etc.) – bring legacy widgets into the new card system */
.pos-biz-card{
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass-strong) !important;
  box-shadow: var(--shadow-soft) !important;
}

.pos-biz-list-item{
  border-radius: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: rgba(255, 255, 255, 0.64) !important;
  box-shadow: 0 14px 26px -22px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .pos-biz-list-item{
  background: rgba(15, 23, 42, 0.62) !important;
}

.pos-bizmode-tab,
.pos-mobile-tab,
.shop-nav-btn{
  border-radius: 16px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.pos-bizmode-tab:hover,
.pos-mobile-tab:hover,
.shop-nav-btn:hover{
  transform: translateY(-1px);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.56) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 16px 30px -24px rgba(15, 23, 42, 0.20);
}

html[data-theme="dark"] .pos-bizmode-tab:hover,
html[data-theme="dark"] .pos-mobile-tab:hover,
html[data-theme="dark"] .shop-nav-btn:hover{
  background: rgba(15, 23, 42, 0.58) !important;
}

.pos-bizmode-tab.active,
.pos-mobile-tab.active,
.shop-nav-btn.active{
  color: var(--text) !important;
  background: linear-gradient(135deg, rgba(var(--brand-blue-rgb), 0.16), rgba(16, 185, 129, 0.10)) !important;
  border-color: rgba(var(--brand-blue-rgb), 0.22) !important;
  box-shadow: 0 20px 40px -28px rgba(var(--brand-blue-rgb), 0.46);
}

.pos-biz-divider{
  background: rgba(148, 163, 184, 0.22) !important;
}

/* Shop – left rail should feel like a mini sidebar */
.shop-admin-nav{
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.shop-nav-section-title{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 10px 6px;
}



/* Settings – left rail should feel like a mini sidebar */
.settings-nav{
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--glass) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px !important;
}
/* Upgrade / availability callouts */
.settings-upgrade-box,
#shop-not-available{
  border-radius: 22px !important;
  border: 1px solid rgba(245, 158, 11, 0.20) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(var(--brand-blue-rgb), 0.08)) !important;
  box-shadow: 0 18px 44px -32px rgba(245, 158, 11, 0.38) !important;
}

/* Charts: ensure canvas blends into glass cards (Chart.js theming is handled in JS). */
.dash-chart-box canvas,
.reports-chart-canvas canvas,
.shop-analytics-card canvas{
  display: block;
  width: 100% !important;
}

@media print{
  body[data-app-view="dashboard"] header.app-header,
  body[data-app-view="dashboard"] #dashboard-section .sidebar,
  body[data-app-view="superadmin"] header.app-header,
  .nui-dropdown-menu,
  .nui-search-results{
    display: none !important;
  }
}


/* -------------------------------------------------------------------------- */
/* New UI Dashboard Insights (template-style graphs)                           */
/* -------------------------------------------------------------------------- */

.dash-insights{
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.dash-insights-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 18px;
}

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

@media (max-width: 1100px){
  .dash-insights-grid{ grid-template-columns: 1fr; }
  .dash-insights-grid-2{ grid-template-columns: 1fr; }
}

.nui-card-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.nui-card-title{
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nui-card-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.nui-pill-group{
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="dark"] .nui-pill-group{
  background: rgba(10,10,10,0.62);
}

.nui-pill{
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  user-select: none;
}

.nui-pill:hover{
  color: var(--text);
  transform: translateY(-1px);
}

.nui-pill.active{
  color: #fff;
  background: rgba(var(--brand-blue-rgb), 0.90);
  border-color: rgba(var(--brand-blue-rgb), 0.18);
  box-shadow: 0 18px 38px -26px rgba(var(--brand-blue-rgb), 0.72);
}

.nui-link-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(var(--brand-blue-rgb), 0.92);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 180ms ease, color 180ms ease;
}
.nui-link-btn:hover{
  background: rgba(var(--brand-blue-rgb), 0.10);
  color: rgba(var(--brand-blue-rgb), 1);
}

.nui-chart-canvas{
  position: relative;
  height: 280px;
}

.nui-chart-canvas.nui-chart-short{
  height: 240px;
}

.nui-chart-canvas canvas,
.nui-donut-wrap canvas{
  width: 100% !important;
  height: 100% !important;
}

.nui-donut-layout{
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 240px;
}

@media (max-width: 1100px){
  .nui-donut-layout{
    flex-direction: column;
    align-items: flex-start;
  }
}

.nui-donut-wrap{
  width: 240px;
  height: 240px;
  flex: 0 0 auto;
  position: relative;
}

.nui-donut-legend{
  flex: 1 1 auto;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nui-legend-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.38);
}
html[data-theme="dark"] .nui-legend-item{
  background: rgba(10,10,10,0.50);
  border-color: rgba(255,255,255,0.08);
}

.nui-legend-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nui-legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot-color, rgba(var(--brand-blue-rgb), 0.92));
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
html[data-theme="dark"] .nui-legend-dot{
  box-shadow: 0 0 0 4px rgba(0,0,0,0.30);
}

.nui-legend-name{
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nui-legend-val{
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
  flex: 0 0 auto;
}

/* Health rings */
.nui-health-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.nui-health-status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
html[data-theme="dark"] .nui-health-status{
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.nui-health-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}
@media (max-width: 1100px){
  .nui-health-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .nui-health-grid{ grid-template-columns: minmax(0, 1fr); }
}

.nui-health-item{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nui-ring{
  position: relative;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
}

.nui-ring svg{
  width: 86px;
  height: 86px;
  transform: rotate(-90deg);
}

.nui-ring circle{
  fill: none;
  stroke-width: 8;
}

.nui-ring .nui-ring-bg{
  stroke: rgba(148, 163, 184, 0.18);
}
html[data-theme="dark"] .nui-ring .nui-ring-bg{
  stroke: rgba(255,255,255,0.10);
}

.nui-ring .nui-ring-meter{
  stroke: var(--ring-color, rgba(var(--brand-blue-rgb), 0.92));
  stroke-linecap: round;
  stroke-dasharray: 251; /* 2 * pi * r (r=40) ≈ 251 */
  stroke-dashoffset: 251;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.18));
  transition: stroke-dashoffset 400ms ease;
}

.nui-ring-value{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nui-health-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nui-health-label{
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nui-health-note{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profit list */
.nui-profit-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.nui-profit-row{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.nui-profit-icon{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(var(--brand-blue-rgb), 0.16);
  border: 1px solid rgba(var(--brand-blue-rgb), 0.18);
  display: grid;
  place-items: center;
  color: rgba(var(--brand-blue-rgb), 0.98);
  font-weight: 900;
  font-size: 13px;
  overflow: hidden;
}
html[data-theme="dark"] .nui-profit-icon{
  background: rgba(var(--brand-blue-rgb), 0.20);
}

.nui-profit-name{
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nui-profit-bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
html[data-theme="dark"] .nui-profit-bar{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

.nui-profit-bar > span{
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--bar-color, rgba(var(--brand-blue-rgb), 0.92));
  transition: width 420ms ease;
}

.nui-profit-amount{
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.nui-profit-amount.pos{
  color: #10b981;
}
.nui-profit-amount.neg{
  color: #ef4444;
}

/* Heatmap */
.nui-heat-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nui-heat-legend{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.nui-heat-legend .item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nui-heat-swatch{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.30);
}

.nui-heat-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.nui-heat-day{
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding-bottom: 2px;
}

.nui-heat-cell{
  height: 28px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] .nui-heat-cell{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}

.nui-heat-cell:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -28px rgba(0,0,0,0.38);
}



/* ========================================================================
   Shemify brand system — final overrides
   Brand: red #A93E17 + blue #15399A (from shemify.com)
   ======================================================================== */
:root{
  --brand-red: #A93E17;
  --brand-blue: #15399A;
  --brand-red-rgb: 169, 62, 23;
  --brand-blue-rgb: 21, 57, 154;
  --brand-gradient: linear-gradient(to right, var(--brand-red) 0%, var(--brand-blue) 50%, var(--brand-red) 100%);
  --brand-gradient-flat: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-blue) 100%);

  --accent: var(--brand-blue);
  --accent-2: var(--brand-red);
  --accent-soft: rgba(21, 57, 154, 0.12);
  --accent-strong: rgba(21, 57, 154, 0.22);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #0ea5e9;

  --bg: #f8fafc;
  --bg-alt: #eef2ff;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-2: rgba(255, 255, 255, 0.86);
  --surface-3: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: rgba(148, 163, 184, 0.34);
  --focus: rgba(21, 57, 154, 0.18);

  --chart-grid: rgba(148, 163, 184, 0.22);
  --chart-tick: #64748b;
  --chart-tooltip-bg: rgba(255, 255, 255, 0.96);

  --shadow-soft: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow: 0 32px 70px rgba(15, 23, 42, 0.12);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-dark: rgba(255, 255, 255, 0.72);

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --radius-xs: 12px;

  --nui-header-height: 76px;
  --nui-sidebar-width: 280px;
  --nui-sidebar-collapsed-width: 80px;
}

html[data-theme="dark"]{
  --brand-red: #A93E17;
  --brand-blue: #15399A;
  --brand-red-rgb: 169, 62, 23;
  --brand-blue-rgb: 21, 57, 154;
  --brand-gradient: linear-gradient(to right, var(--brand-red) 0%, var(--brand-blue) 50%, var(--brand-red) 100%);
  --brand-gradient-flat: linear-gradient(90deg, var(--brand-red) 0%, var(--brand-blue) 100%);

  --accent: var(--brand-blue);
  --accent-2: var(--brand-red);
  --accent-soft: rgba(21, 57, 154, 0.18);
  --accent-strong: rgba(21, 57, 154, 0.30);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #0ea5e9;

  --bg: #060606;
  --bg-alt: #0A0A0A;
  --surface: rgba(10, 10, 10, 0.94);
  --surface-2: rgba(10, 10, 10, 0.82);
  --surface-3: rgba(10, 10, 10, 0.66);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #1e293b;
  --border-strong: rgba(148, 163, 184, 0.20);
  --focus: rgba(21, 57, 154, 0.28);

  --chart-grid: rgba(148, 163, 184, 0.18);
  --chart-tick: #94a3b8;
  --chart-tooltip-bg: rgba(10, 10, 10, 0.96);

  --shadow-soft: 0 18px 54px rgba(0, 0, 0, 0.42);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.58);
  --glass: rgba(10, 10, 10, 0.85);
  --glass-strong: rgba(10, 10, 10, 0.92);
  --glass-dark: rgba(10, 10, 10, 0.78);
}

body{
  background:
    radial-gradient(960px 540px at 14% -8%, rgba(21, 57, 154, 0.16), transparent 58%),
    radial-gradient(860px 500px at 100% 0%, rgba(169, 62, 23, 0.14), transparent 54%),
    radial-gradient(720px 420px at 76% 12%, rgba(16, 185, 129, 0.10), transparent 48%),
    linear-gradient(180deg, var(--bg), var(--bg-alt)) !important;
}

body[data-app-view="dashboard"] header.app-header .brand,
body[data-app-view="dashboard"] header.app-header .tagline,
body[data-app-view="superadmin"] header.app-header .brand,
body[data-app-view="superadmin"] header.app-header .tagline{
  display: none !important;
}

body[data-app-view="dashboard"] header.app-header,
body[data-app-view="superadmin"] header.app-header{
  min-height: var(--nui-header-height) !important;
  padding: 12px 20px !important;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08) !important;
}

body[data-app-view="dashboard"] .app-header-left,
body[data-app-view="dashboard"] .app-header-center,
body[data-app-view="dashboard"] .app-header-right,
body[data-app-view="superadmin"] .app-header-left,
body[data-app-view="superadmin"] .app-header-center,
body[data-app-view="superadmin"] .app-header-right{
  min-width: 0;
}

body[data-app-view="dashboard"] .app-header-center,
body[data-app-view="superadmin"] .app-header-center{
  justify-content: flex-start;
}

body[data-app-view="dashboard"] .nui-header-search,
body[data-app-view="superadmin"] .nui-header-search{
  width: min(100%, 420px);
}

body[data-app-view="dashboard"] #theme-toggle,
body[data-app-view="superadmin"] #theme-toggle,
body[data-app-view="dashboard"] #nui-sidebar-toggle,
body[data-app-view="superadmin"] #nui-sidebar-toggle,
body[data-app-view="dashboard"] #nui-quick-action,
body[data-app-view="superadmin"] #nui-quick-action,
body[data-app-view="dashboard"] #nui-notifications-toggle,
body[data-app-view="superadmin"] #nui-notifications-toggle{
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

body[data-app-view="dashboard"] #theme-toggle:hover,
body[data-app-view="superadmin"] #theme-toggle:hover,
body[data-app-view="dashboard"] #nui-sidebar-toggle:hover,
body[data-app-view="superadmin"] #nui-sidebar-toggle:hover,
body[data-app-view="dashboard"] #nui-quick-action:hover,
body[data-app-view="superadmin"] #nui-quick-action:hover,
body[data-app-view="dashboard"] #nui-notifications-toggle:hover,
body[data-app-view="superadmin"] #nui-notifications-toggle:hover{
  background: rgba(21, 57, 154, 0.10) !important;
  border-color: rgba(21, 57, 154, 0.30) !important;
}

.nui-quick-action-label{
  display: none !important;
}

.nui-profile-toggle{
  padding: 4px !important;
  max-width: none !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

.nui-profile-toggle:hover,
.nui-profile-toggle:focus-visible{
  background: rgba(21, 57, 154, 0.08) !important;
  border-color: rgba(21, 57, 154, 0.18) !important;
}

.nui-profile-text,
.nui-profile-caret{
  display: none !important;
}

.nui-profile-toggle #nui-profile-avatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--brand-gradient-flat) !important;
  box-shadow: none !important;
}

#dashboard-section .dashboard-shell{
  grid-template-columns: var(--nui-sidebar-width) minmax(0, 1fr) !important;
}

body.nui-sidebar-collapsed #dashboard-section .dashboard-shell{
  grid-template-columns: var(--nui-sidebar-collapsed-width) minmax(0, 1fr) !important;
}

#dashboard-section .sidebar{
  display: flex;
  flex-direction: column;
  padding: 18px 0 18px !important;
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#dashboard-section .sidebar::before{
  background: radial-gradient(circle at 14% 8%, rgba(21, 57, 154, 0.12) 0, transparent 55%) !important;
  filter: blur(22px);
}

#dashboard-section .sidebar-header{
  padding: 0 18px 18px !important;
  margin-bottom: 10px;
  gap: 12px;
  border-bottom: 1px solid var(--border) !important;
}

.nui-sidebar-brand-mark{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--brand-gradient-flat) !important;
  box-shadow: none !important;
}

.nui-sidebar-brand-title{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nui-sidebar-brand-sub{
  font-size: 12px;
}

.plan-chip,
.nui-workspace-pill{
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(21, 57, 154, 0.18) !important;
  background: rgba(21, 57, 154, 0.06) !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.plan-chip.free{
  background: rgba(6, 182, 212, 0.08) !important;
  border-color: rgba(6, 182, 212, 0.22) !important;
  color: #0891b2 !important;
}

.plan-chip.pro,
.plan-chip.premium,
.plan-chip.plus,
.plan-chip.growth,
.plan-chip.enterprise{
  background: linear-gradient(135deg, rgba(21, 57, 154, 0.16), rgba(169, 62, 23, 0.16), rgba(169, 62, 23, 0.16)) !important;
  border-color: rgba(21, 57, 154, 0.24) !important;
}

.location-switcher{
  margin: 0 12px 12px !important;
  padding: 14px !important;
  border-radius: 16px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.sidebar-search{
  margin: 0 12px 12px !important;
  height: 42px;
  border-radius: 12px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#main-menu{
  flex: 1 1 auto;
  gap: 0;
  padding: 2px 0 18px !important;
}

#main-menu .menu-section-title{
  padding: 16px 20px 8px !important;
  margin-top: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  color: var(--muted) !important;
}

#main-menu .menu-item{
  padding: 0;
  margin: 0;
}

#main-menu .menu-button{
  min-height: 48px !important;
  margin: 2px 12px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

#main-menu .menu-button:hover{
  transform: none !important;
  background: linear-gradient(135deg, rgba(21, 57, 154, 0.10), rgba(169, 62, 23, 0.05)) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

#main-menu .menu-button.active{
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

#main-menu .menu-button.active .nui-menu-icon,
#main-menu .menu-button.active .menu-label,
#main-menu .menu-button.active .menu-badge,
#main-menu .menu-button.active .nui-text-badge{
  color: #ffffff !important;
}

.nui-menu-icon{
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: currentColor !important;
}

.nui-menu-icon svg{
  width: 20px !important;
  height: 20px !important;
}

.nui-text-badge{
  min-height: auto !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(245, 158, 11, 0.26) !important;
  background: rgba(245, 158, 11, 0.10) !important;
  color: #d97706 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.nui-sidebar-footer{
  margin-top: auto;
  padding: 12px 12px 0;
  position: relative;
  z-index: 2;
  background: var(--surface);
}

.nui-sidebar-footer-card{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(21, 57, 154, 0.08), rgba(169, 62, 23, 0.04));
  border: 1px solid var(--border);
}

.nui-sidebar-footer-avatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient-flat);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.nui-sidebar-footer-copy{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nui-sidebar-footer-name{
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nui-sidebar-footer-sub{
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nui-sidebar-collapsed .nui-sidebar-brand-copy,
body.nui-sidebar-collapsed .nui-sidebar-status-row,
body.nui-sidebar-collapsed .sidebar-search,
body.nui-sidebar-collapsed .location-switcher,
body.nui-sidebar-collapsed #main-menu .menu-section-title,
body.nui-sidebar-collapsed #main-menu .menu-button .menu-label span:last-child,
body.nui-sidebar-collapsed #main-menu .menu-button .menu-badge,
body.nui-sidebar-collapsed .nui-text-badge,
body.nui-sidebar-collapsed .nui-sidebar-footer-copy{
  display: none !important;
}

body.nui-sidebar-collapsed #dashboard-section .sidebar-header{
  padding-inline: 20px !important;
  align-items: center;
}

body.nui-sidebar-collapsed #main-menu .menu-button{
  margin: 2px 10px !important;
  justify-content: center !important;
  padding-inline: 0 !important;
}

body.nui-sidebar-collapsed #main-menu .menu-label{
  justify-content: center !important;
}

body.nui-sidebar-collapsed .nui-sidebar-footer{
  padding-inline: 10px !important;
}

body.nui-sidebar-collapsed .nui-sidebar-footer-card{
  justify-content: center;
}

#dashboard-section .content{
  padding: 22px 24px 34px !important;
}

#dashboard-section .content-header{
  margin: 0 0 18px !important;
  padding: 18px 20px !important;
  border-radius: 20px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#mobile-nav-toggle,
#cmdk-open{
  display: none !important;
}

.welcome-text-main{
  font-size: 24px !important;
  font-weight: 700 !important;
}

.welcome-text-sub{
  margin-top: 4px;
  font-size: 13px !important;
}

.label-pill{
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.16) !important;
  color: #dc2626 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .label-pill{
  color: #f87171 !important;
}

.content-tagline{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nui-page-hero{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  margin: 0 0 22px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0% 0%, rgba(21, 57, 154, 0.14) 0, transparent 48%),
    radial-gradient(circle at 100% 0%, rgba(169, 62, 23, 0.12) 0, transparent 42%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: none;
  overflow: hidden;
}

.nui-page-hero::after{
  content: "";
  position: absolute;
  inset: auto -10% -55% auto;
  width: 280px;
  height: 280px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0, transparent 62%);
  filter: blur(18px);
}

.nui-page-hero-copy,
.nui-page-hero-stats{
  position: relative;
  z-index: 1;
}

.nui-page-hero-kicker{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nui-page-hero-title-row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nui-page-hero-title{
  margin: 0;
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nui-page-hero-pill{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(21, 57, 154, 0.10);
  border: 1px solid rgba(21, 57, 154, 0.16);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.nui-page-hero-desc{
  margin: 10px 0 0;
  max-width: 64ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.nui-page-hero-stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.nui-page-hero-stat{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .nui-page-hero-stat{
  background: rgba(15, 23, 42, 0.56);
}

.nui-page-hero-stat-label{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nui-page-hero-stat-value{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.card,
.dash-card,
.pos-panel,
.history-panel,
.reports-panel,
.debts-panel,
.settings-content,
.logs-card,
.shop-card,
.shop-analytics-card,
.support-card,
.webpage-card,
.loy-panel,
.gc-card,
.pro-card,
.pos-modal,
.history-modal,
.modal-card,
.support-modal,
.shop-order-modal-card,
.team2-emp-card,
.team-org-node,
.simple-list,
.summary-card,
.mini-card,
.reports-box,
.reports-mini-table,
.reports-kpi,
.reports-list,
.pos-table-card,
.history-table-wrap,
.history-summary,
.history-kv,
.gc-sheet-card,
.gc-template-item,
.settings-mini-table-wrapper,
.settings-subscription-summary,
.settings-subscription-details,
.settings-billing-history,
.settings-payouts-history,
.settings-payroll-totals,
.settings-payroll-deductions-wrap,
.settings-custom-role-box,
.shop-order-modal,
.shop-order-modal-head,
.shop-order-modal-foot,
.shop-order-modal-grid,
.card.webpage-card,
#support-page .card,
#support-page .support-card,
#support-page .support-modal,
.loy-shell .card,
.gc-shell .card{
  border-radius: 20px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#dashboard-section .btn-primary,
body[data-app-view="superadmin"] .btn-primary{
  background: var(--brand-gradient-flat) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

#dashboard-section .btn-secondary,
body[data-app-view="superadmin"] .btn-secondary,
#dashboard-section .icon-btn,
body[data-app-view="superadmin"] .icon-btn,
#dashboard-section .settings-nav-btn,
body[data-app-view="superadmin"] .settings-nav-btn{
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#dashboard-section .btn:hover,
body[data-app-view="superadmin"] .btn:hover{
  transform: none !important;
}

#dashboard-section input:not([type="checkbox"]):not([type="radio"]),
#dashboard-section select,
#dashboard-section textarea,
body[data-app-view="superadmin"] input:not([type="checkbox"]):not([type="radio"]),
body[data-app-view="superadmin"] select,
body[data-app-view="superadmin"] textarea{
  border-radius: 12px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

#dashboard-section input:not([type="checkbox"]):not([type="radio"]):focus,
#dashboard-section select:focus,
#dashboard-section textarea:focus,
body[data-app-view="superadmin"] input:not([type="checkbox"]):not([type="radio"]):focus,
body[data-app-view="superadmin"] select:focus,
body[data-app-view="superadmin"] textarea:focus{
  box-shadow: 0 0 0 3px rgba(21, 57, 154, 0.15) !important;
  border-color: rgba(21, 57, 154, 0.6) !important;
}

#dashboard-section table,
body[data-app-view="superadmin"] table{
  border-collapse: separate;
  border-spacing: 0;
}

#dashboard-section th,
body[data-app-view="superadmin"] th{
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted) !important;
}

#dashboard-section td,
body[data-app-view="superadmin"] td{
  border-color: rgba(148, 163, 184, 0.14) !important;
}

#dashboard-section tbody tr:hover td,
body[data-app-view="superadmin"] tbody tr:hover td{
  background: rgba(21, 57, 154, 0.04);
}

@media (max-width: 960px){
  :root{
    --nui-header-height: 72px;
  }

  body[data-app-view="dashboard"] header.app-header,
  body[data-app-view="superadmin"] header.app-header{
    padding: 10px 14px !important;
  }

  #dashboard-section .content{
    padding: 18px 14px 24px !important;
  }

  .nui-page-hero{
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 18px;
  }

  .nui-page-hero-title{
    font-size: 28px;
  }

  .nui-page-hero-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nui-sidebar-footer{
    padding-bottom: 6px;
  }

  body.nui-sidebar-collapsed #dashboard-section .dashboard-shell{
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboard-section .sidebar{
    padding-top: 16px !important;
  }
}

@media (max-width: 640px){
  .nui-page-hero{
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 20px;
  }

  .nui-page-hero-title{
    font-size: 24px;
  }

  .nui-page-hero-stats{
    grid-template-columns: minmax(0, 1fr);
  }

  #dashboard-section .content-header{
    padding: 16px !important;
  }

  .welcome-text-main{
    font-size: 21px !important;
  }
}


/* -------------------------------------------------------------------------- */
/* 2026-03-07 patch v2: desktop shell parity with TradeBotX                   */
/* - Keep the dashboard sidebar fixed to the viewport on desktop              */
/* - Shift the Shemify header + main canvas using sidebar-style margins       */
/* - Prevent the dashboard card surface from becoming a containing block      */
/*   for the fixed sidebar (this caused the left gap / empty strip bug)       */
/* -------------------------------------------------------------------------- */
body[data-app-view="dashboard"] #dashboard-section.card{
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  contain: none !important;
  isolation: auto !important;
}

@media (min-width: 961px){
  body[data-app-view="dashboard"]{
    overflow-x: hidden;
  }

  body[data-app-view="dashboard"] header.app-header{
    margin-left: var(--nui-sidebar-width) !important;
    width: auto !important;
    max-width: none !important;
    transition:
      margin-left 220ms ease,
      padding 220ms ease !important;
  }

  body[data-app-view="dashboard"].nui-sidebar-collapsed header.app-header{
    margin-left: var(--nui-sidebar-collapsed-width) !important;
  }

  body[data-app-view="dashboard"] #main-content{
    margin-left: var(--nui-sidebar-width) !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    transition: margin-left 220ms ease !important;
  }

  body[data-app-view="dashboard"].nui-sidebar-collapsed #main-content{
    margin-left: var(--nui-sidebar-collapsed-width) !important;
  }

  body[data-app-view="dashboard"] #dashboard-section .dashboard-shell{
    display: block !important;
    min-height: calc(100vh - var(--nui-header-height)) !important;
    overflow: visible !important;
  }

  body[data-app-view="dashboard"] #dashboard-section .sidebar{
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: var(--nui-sidebar-width) !important;
    height: 100vh !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    overflow: hidden !important;
    z-index: 100 !important;
  }

  body[data-app-view="dashboard"].nui-sidebar-collapsed #dashboard-section .sidebar{
    width: var(--nui-sidebar-collapsed-width) !important;
  }

  body[data-app-view="dashboard"] #dashboard-section .sidebar-header,
  body[data-app-view="dashboard"] #dashboard-section .location-switcher,
  body[data-app-view="dashboard"] #dashboard-section .sidebar-search,
  body[data-app-view="dashboard"] #dashboard-section #nui-sidebar-utility,
  body[data-app-view="dashboard"] #dashboard-section #nui-sidebar-footer{
    flex: 0 0 auto;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu{
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin-bottom: 14px !important;
    padding-bottom: 18px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    padding-right: 6px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.40) transparent;
  }

  body[data-app-view="dashboard"] #dashboard-section .sidebar{
    scrollbar-width: none !important;
  }

  body[data-app-view="dashboard"] #dashboard-section .sidebar::-webkit-scrollbar{
    width: 0 !important;
    height: 0 !important;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu::-webkit-scrollbar{
    width: 6px;
    height: 6px;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu::-webkit-scrollbar-track{
    background: transparent;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu::-webkit-scrollbar-thumb{
    background: rgba(148, 163, 184, 0.34);
    border-radius: 999px;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu::-webkit-scrollbar-thumb:hover{
    background: rgba(100, 116, 139, 0.72);
  }

  body[data-app-view="dashboard"] #dashboard-section .content{
    min-height: calc(100vh - var(--nui-header-height)) !important;
  }
}

#nui-sidebar-utility{
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0 12px 0;
  position: relative;
  z-index: 2;
  background: var(--surface);
}

#nui-sidebar-utility .nui-sidebar-utility-item{
  display: block;
  list-style: none;
  margin: 0 !important;
  padding: 0;
}

#nui-sidebar-utility .menu-link{
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

#nui-sidebar-utility .menu-link span:last-child,
#nui-sidebar-utility .menu-link label,
#nui-sidebar-utility .menu-link div{
  color: var(--text) !important;
}

body.nui-sidebar-collapsed #nui-sidebar-utility{
  display: none !important;
}

@media (max-width: 960px){
  body[data-app-view="dashboard"] header.app-header,
  body[data-app-view="dashboard"] #main-content{
    margin-left: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  body[data-app-view="dashboard"] #dashboard-section .sidebar{
    overflow-y: auto !important;
  }

  body[data-app-view="dashboard"] #dashboard-section #main-menu{
    overflow: visible !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
    padding-right: 0 !important;
  }

  #nui-sidebar-utility{
    padding-bottom: 6px;
  }
}

/* -------------------------------------------------------------------------- */
/* Restaurant host board / OpenTable-style tables upgrade                      */
/* -------------------------------------------------------------------------- */

.pos-host-shell{
  display:grid;
  gap:18px;
  color:#f8fafc;
}

.pos-host-toolbar,
.pos-host-rail-card,
.pos-host-stage-card,
.pos-host-inspector-card,
.pos-host-kpi{
  border:1px solid rgba(255,255,255,0.09);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(10,18,34,0.96), rgba(16,24,40,0.96));
  box-shadow:0 24px 50px rgba(2, 8, 23, 0.34);
}

.pos-host-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
}

.pos-host-toolbar-left,
.pos-host-toolbar-right{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.pos-host-toolbar-group{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.09);
  background:rgba(255,255,255,0.04);
}

.pos-host-iconbtn,
.pos-host-segment,
.pos-host-chip,
.pos-host-row-btn,
.pos-host-timeline-label{
  appearance:none;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
  color:#f8fafc;
  border-radius:14px;
  font-weight:800;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.pos-host-iconbtn:hover,
.pos-host-segment:hover,
.pos-host-chip:hover,
.pos-host-row-btn:hover,
.pos-host-timeline-label:hover,
.pos-host-map-item:hover,
.pos-host-card:hover,
.pos-host-row:hover,
.pos-host-check:hover{
  transform:translateY(-1px);
  border-color:rgba(99,102,241,0.45);
  box-shadow:0 18px 34px rgba(37,99,235,0.12);
}

.pos-host-iconbtn{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  font-size:24px;
  line-height:1;
}

.pos-host-segment,
.pos-host-chip,
.pos-host-row-btn,
.pos-host-timeline-label{
  padding:10px 14px;
  font-size:12px;
}

.pos-host-segment.active,
.pos-host-chip.active{
  background:linear-gradient(135deg, rgba(59,130,246,0.36), rgba(168,85,247,0.26));
  border-color:rgba(96,165,250,0.65);
  color:#fff;
}

.pos-host-date-pill,
.pos-host-live-pill,
.pos-host-count-pill,
.pos-host-alert-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:#f8fafc;
  font-weight:800;
}

.pos-host-live-pill{
  background:rgba(16,185,129,0.14);
  border-color:rgba(16,185,129,0.34);
}

.pos-host-live-pill.is-future{
  background:rgba(59,130,246,0.14);
  border-color:rgba(59,130,246,0.34);
}

.pos-host-kpis{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:12px;
}

.pos-host-kpi{
  padding:16px 18px;
  display:grid;
  gap:6px;
}

.pos-host-kpi span,
.pos-host-summary-card span,
.pos-host-selection-grid span{
  color:rgba(226,232,240,0.70);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:900;
}

.pos-host-kpi strong,
.pos-host-summary-card strong{
  color:#fff;
  font-size:30px;
  line-height:1;
  font-weight:900;
}

.pos-host-kpi small{
  color:#94a3b8;
  font-size:12px;
}

.pos-host-layout{
  display:grid;
  grid-template-columns:340px minmax(0, 1fr) 320px;
  gap:18px;
  align-items:start;
}

.pos-host-rail,
.pos-host-inspector{
  display:grid;
  gap:16px;
}

.pos-host-rail-card,
.pos-host-inspector-card,
.pos-host-stage-card{
  padding:16px;
}

.pos-host-search-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  min-height:52px;
  border-radius:16px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.10);
}

.pos-host-search-icon{
  font-size:18px;
  color:#94a3b8;
}

.pos-host-search-input{
  width:100%;
  border:0 !important;
  outline:0;
  background:transparent;
  color:#fff;
  font-size:15px;
}

.pos-host-search-input::placeholder{
  color:#64748b;
}

.pos-host-section-head,
.pos-host-stage-head,
.pos-host-stage-foot{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.pos-host-section-head,
.pos-host-stage-head{
  margin-bottom:14px;
}

.pos-host-section-title,
.pos-host-stage-title,
.pos-host-selection-title,
.pos-host-summary-note-title,
.pos-host-check-title,
.pos-host-card-title{
  color:#fff;
  font-size:16px;
  font-weight:900;
}

.pos-host-stage-title{
  font-size:18px;
}

.pos-host-stage-tools{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}

.pos-host-filter-switch{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.pos-host-area-select-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 0 0 10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
}

.pos-host-area-select{
  min-width:148px;
  background:transparent !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:none !important;
}

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

.pos-host-row,
.pos-host-check,
.pos-host-card,
.pos-host-selection-card,
.pos-host-summary-note{
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
}

.pos-host-row,
.pos-host-check{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  cursor:pointer;
}

.pos-host-row-side,
.pos-host-row-actions,
.pos-host-check-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.pos-host-row-main{
  min-width:0;
  flex:1 1 auto;
  display:grid;
  grid-template-columns:68px minmax(0, 1fr);
  grid-template-areas:
    "time name"
    "time meta";
  column-gap:12px;
  row-gap:2px;
  align-items:center;
}

.pos-host-row-time{
  grid-area:time;
  min-width:68px;
  color:#e2e8f0;
  font-weight:800;
}

.pos-host-row-name{
  grid-area:name;
  color:#fff;
  font-size:15px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pos-host-row-meta,
.pos-host-selection-meta,
.pos-host-map-guest--muted{
  grid-area:meta;
  color:#94a3b8;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pos-host-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:#fff;
}

.pos-host-status--booked,
.pos-host-status--reserved{
  background:rgba(168,85,247,0.16);
  border-color:rgba(192,132,252,0.38);
}

.pos-host-status--seated,
.pos-host-status--occupied{
  background:rgba(59,130,246,0.16);
  border-color:rgba(96,165,250,0.38);
}

.pos-host-status--available{
  background:rgba(148,163,184,0.16);
  border-color:rgba(148,163,184,0.30);
}

.pos-host-status--cancelled{
  background:rgba(239,68,68,0.14);
  border-color:rgba(248,113,113,0.36);
}

.pos-host-status--completed{
  background:rgba(16,185,129,0.14);
  border-color:rgba(52,211,153,0.34);
}

.pos-host-row-btn{
  white-space:nowrap;
}

.pos-host-check-total,
.pos-host-selection-grid strong,
.pos-host-card-line strong{
  color:#fff;
  font-weight:900;
}

.pos-host-alert-pill{
  min-height:28px;
  padding:0 10px;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:rgba(245,158,11,0.18);
  border-color:rgba(251,191,36,0.36);
}

.pos-host-stage-card{
  min-height:820px;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) auto;
}

.pos-host-stage-body{
  min-height:640px;
}

.pos-host-view{
  min-height:640px;
}

.pos-host-map-stage{
  min-height:640px;
  display:grid;
  grid-template-columns:repeat(16, minmax(34px, 1fr));
  grid-auto-rows:42px;
  gap:14px;
  padding:10px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(30,41,59,0.86), rgba(30,41,59,0.74));
  border:1px solid rgba(255,255,255,0.08);
}

.pos-host-map-item{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:100%;
  min-height:100%;
  padding:14px 10px 12px;
  color:#fff;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(71,85,105,0.58);
  cursor:pointer;
  grid-column:var(--c) / span 2;
  grid-row:var(--r) / span 2;
  overflow:visible;
}

.pos-host-map-item.shape-round{
  border-radius:999px;
}

.pos-host-map-item.shape-square{
  border-radius:22px;
}

.pos-host-map-item.shape-rect{
  border-radius:22px;
  grid-column:var(--c) / span 3;
}

.pos-host-map-item.shape-banquet{
  border-radius:22px;
  grid-column:var(--c) / span 4;
}

.pos-host-map-item.shape-diamond{
  border-radius:28px;
  clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.pos-host-map-item--available{
  background:rgba(100,116,139,0.42);
}

.pos-host-map-item--reserved{
  background:linear-gradient(180deg, rgba(192,132,252,0.60), rgba(168,85,247,0.48));
}

.pos-host-map-item--occupied{
  background:linear-gradient(180deg, rgba(96,165,250,0.74), rgba(37,99,235,0.58));
}

.pos-host-map-item.is-alert{
  box-shadow:0 0 0 2px rgba(251,191,36,0.26), 0 24px 48px rgba(251,191,36,0.14);
}

.pos-host-map-item.is-selected,
.pos-host-card.is-selected{
  box-shadow:0 0 0 2px rgba(34,211,238,0.34), 0 28px 56px rgba(34,211,238,0.12);
  border-color:rgba(34,211,238,0.50);
}

.pos-host-map-party,
.pos-host-map-spend,
.pos-host-map-time{
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:#fff;
  border:1px solid rgba(255,255,255,0.16);
}

.pos-host-map-party{
  top:-12px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(15,23,42,0.90);
}

.pos-host-map-spend{
  top:-12px;
  right:-8px;
  background:rgba(16,185,129,0.92);
}

.pos-host-map-time{
  bottom:-10px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(15,23,42,0.94);
}

.pos-host-map-name{
  font-size:18px;
  font-weight:900;
  line-height:1;
}

.pos-host-map-guest{
  font-size:12px;
  font-weight:700;
  text-align:center;
}

.pos-host-cards-view{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:14px;
}

.pos-host-card{
  padding:16px;
  display:grid;
  gap:14px;
  cursor:pointer;
}

.pos-host-card-top,
.pos-host-card-line,
.pos-host-card-actions,
.pos-host-selection-actions,
.pos-host-selection-grid,
.pos-host-summary-grid,
.pos-host-legend{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pos-host-card-meta{
  color:#94a3b8;
  font-size:12px;
}

.pos-host-card-body{
  display:grid;
  gap:8px;
}

.pos-host-card-line span{
  color:#94a3b8;
  font-size:12px;
}

.pos-host-timeline{
  border-radius:22px;
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(15,23,42,0.72), rgba(15,23,42,0.58));
  overflow:hidden;
}

.pos-host-timeline-head,
.pos-host-timeline-row{
  display:grid;
  grid-template-columns:170px minmax(0, 1fr);
}

.pos-host-timeline-head{
  border-bottom:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
}

.pos-host-timeline-corner{
  padding:14px;
  color:#cbd5e1;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.pos-host-timeline-hours{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(60px, 1fr));
}

.pos-host-timeline-hours span{
  padding:14px 10px;
  color:#94a3b8;
  font-size:12px;
  text-align:center;
  border-left:1px solid rgba(255,255,255,0.06);
}

.pos-host-timeline-body{
  max-height:600px;
  overflow:auto;
}

.pos-host-timeline-row{
  min-height:74px;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.pos-host-timeline-label{
  margin:10px;
  align-self:center;
}

.pos-host-timeline-track{
  position:relative;
  min-height:74px;
  padding:10px 14px;
}

.pos-host-timeline-track::before{
  content:"";
  position:absolute;
  inset:0 0 0 0;
  background:linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size:calc(100% / var(--ticks, 6)) 100%;
  pointer-events:none;
  opacity:.7;
}

.pos-host-timeline-block{
  position:absolute;
  top:16px;
  height:40px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(168,85,247,0.22);
  color:#fff;
  font-size:12px;
  font-weight:800;
  text-align:left;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.pos-host-timeline-block--seated{
  background:rgba(59,130,246,0.24);
}

.pos-host-timeline-block--completed{
  background:rgba(16,185,129,0.18);
}

.pos-host-timeline-block--cancelled{
  background:rgba(239,68,68,0.18);
}

.pos-host-timeline-empty{
  position:absolute;
  left:14px;
  top:26px;
  color:#64748b;
  font-size:12px;
}

.pos-host-selection-card,
.pos-host-summary-note{
  padding:16px;
}

.pos-host-selection-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin:16px 0;
}

.pos-host-selection-grid strong{
  display:block;
  margin-top:4px;
  font-size:14px;
}

.pos-host-selection-actions,
.pos-host-card-actions{
  flex-wrap:wrap;
}

.pos-host-summary-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-bottom:14px;
}

.pos-host-summary-card{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
}

.pos-host-summary-note{
  display:grid;
  gap:8px;
}

.pos-host-stage-foot{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.08);
}

.pos-host-legend{
  flex-wrap:wrap;
}

.pos-host-legend span{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#cbd5e1;
  font-size:12px;
}

.pos-host-legend-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#94a3b8;
  display:inline-block;
}

.pos-host-legend-dot.available{ background:#94a3b8; }
.pos-host-legend-dot.reserved{ background:#c084fc; }
.pos-host-legend-dot.occupied{ background:#60a5fa; }
.pos-host-legend-dot.alert{ background:#fbbf24; }

@media (max-width: 1560px){
  .pos-host-layout{
    grid-template-columns:320px minmax(0, 1fr) 290px;
  }
  .pos-host-kpis{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px){
  .pos-host-layout{
    grid-template-columns:1fr;
  }
  .pos-host-stage-card{
    order:1;
  }
  .pos-host-rail{
    order:2;
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
  .pos-host-inspector{
    order:3;
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px){
  .pos-host-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .pos-host-toolbar-left,
  .pos-host-toolbar-right{
    width:100%;
  }
  .pos-host-kpis{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .pos-host-rail,
  .pos-host-inspector{
    grid-template-columns:1fr;
  }
  .pos-host-stage-head,
  .pos-host-stage-foot{
    flex-direction:column;
    align-items:flex-start;
  }
  .pos-host-stage-tools{
    width:100%;
    justify-content:flex-start;
  }
  .pos-host-timeline-head,
  .pos-host-timeline-row{
    grid-template-columns:120px minmax(0, 1fr);
  }
}

@media (max-width: 720px){
  .pos-host-kpis{
    grid-template-columns:1fr;
  }
  .pos-host-map-stage{
    grid-template-columns:repeat(8, minmax(34px, 1fr));
    grid-auto-rows:56px;
  }
  .pos-host-map-item{
    grid-column:span 2 !important;
    grid-row:span 2 !important;
  }
  .pos-host-map-item.shape-rect,
  .pos-host-map-item.shape-banquet{
    grid-column:span 3 !important;
  }
}

.pos-host-shell .btn-secondary{
  background:rgba(255,255,255,0.06) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,0.12) !important;
  box-shadow:none !important;
}

.pos-host-shell .btn-secondary:hover{
  background:rgba(255,255,255,0.10) !important;
  border-color:rgba(96,165,250,0.44) !important;
}

.pos-host-shell .btn-primary{
  background:linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:none !important;
}

/* -------------------------------------------------------------------------- */
/* Restaurant host board layout editor overrides                               */
/* Light mode + area editor / zoom / drag support                              */
/* -------------------------------------------------------------------------- */

.pos-host-shell{
  --pos-host-surface: rgba(255,255,255,0.98);
  --pos-host-surface-2: rgba(248,250,252,0.98);
  --pos-host-surface-3: rgba(241,245,249,0.96);
  --pos-host-border: rgba(148,163,184,0.22);
  --pos-host-border-strong: rgba(100,116,139,0.30);
  --pos-host-text: #0f172a;
  --pos-host-text-strong: #020617;
  --pos-host-muted: #64748b;
  --pos-host-soft: rgba(241,245,249,0.96);
  --pos-host-soft-2: rgba(226,232,240,0.86);
  --pos-host-shadow: 0 18px 42px rgba(15,23,42,0.08);
  --pos-host-stage-bg: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  --pos-host-stage-fill: rgba(248,250,252,0.98);
  --pos-host-grid: rgba(148,163,184,0.18);
  --pos-host-grid-strong: rgba(100,116,139,0.10);
  --pos-host-stage-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
  --pos-host-focus: rgba(var(--brand-blue-rgb),0.14);
  --pos-host-active-bg: linear-gradient(135deg, rgba(var(--brand-blue-rgb),0.14), rgba(var(--brand-red-rgb),0.10));
  --pos-host-active-border: rgba(var(--brand-blue-rgb),0.30);
  --pos-host-available-bg: rgba(148,163,184,0.18);
  --pos-host-available-border: rgba(148,163,184,0.32);
  --pos-host-reserved-bg: linear-gradient(180deg, rgba(192,132,252,0.30), rgba(168,85,247,0.22));
  --pos-host-reserved-border: rgba(168,85,247,0.34);
  --pos-host-occupied-bg: linear-gradient(180deg, rgba(96,165,250,0.30), rgba(37,99,235,0.22));
  --pos-host-occupied-border: rgba(37,99,235,0.36);
  --pos-host-alert-ring: 0 0 0 2px rgba(245,158,11,0.22), 0 18px 40px rgba(245,158,11,0.16);
  --pos-host-selected-ring: 0 0 0 2px rgba(var(--brand-blue-rgb),0.24), 0 24px 48px rgba(var(--brand-blue-rgb),0.12);
  --pos-host-tag-dark: rgba(15,23,42,0.88);
  --pos-host-tag-green: rgba(22,163,74,0.96);
}

html[data-theme="dark"] .pos-host-shell{
  --pos-host-surface: linear-gradient(180deg, rgba(10,18,34,0.96), rgba(16,24,40,0.96));
  --pos-host-surface-2: rgba(255,255,255,0.04);
  --pos-host-surface-3: rgba(255,255,255,0.05);
  --pos-host-border: rgba(255,255,255,0.09);
  --pos-host-border-strong: rgba(255,255,255,0.14);
  --pos-host-text: #f8fafc;
  --pos-host-text-strong: #ffffff;
  --pos-host-muted: #94a3b8;
  --pos-host-soft: rgba(255,255,255,0.04);
  --pos-host-soft-2: rgba(255,255,255,0.06);
  --pos-host-shadow: 0 24px 50px rgba(2,8,23,0.34);
  --pos-host-stage-bg: linear-gradient(180deg, rgba(16,24,39,0.98), rgba(30,41,59,0.96));
  --pos-host-stage-fill: rgba(15,23,42,0.72);
  --pos-host-grid: rgba(255,255,255,0.08);
  --pos-host-grid-strong: rgba(255,255,255,0.04);
  --pos-host-stage-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  --pos-host-focus: rgba(96,165,250,0.18);
  --pos-host-active-bg: linear-gradient(135deg, rgba(59,130,246,0.36), rgba(168,85,247,0.26));
  --pos-host-active-border: rgba(96,165,250,0.65);
  --pos-host-available-bg: rgba(100,116,139,0.42);
  --pos-host-available-border: rgba(255,255,255,0.10);
  --pos-host-reserved-bg: linear-gradient(180deg, rgba(192,132,252,0.60), rgba(168,85,247,0.48));
  --pos-host-reserved-border: rgba(255,255,255,0.10);
  --pos-host-occupied-bg: linear-gradient(180deg, rgba(96,165,250,0.74), rgba(37,99,235,0.58));
  --pos-host-occupied-border: rgba(255,255,255,0.10);
  --pos-host-alert-ring: 0 0 0 2px rgba(251,191,36,0.26), 0 24px 48px rgba(251,191,36,0.14);
  --pos-host-selected-ring: 0 0 0 2px rgba(34,211,238,0.34), 0 28px 56px rgba(34,211,238,0.12);
  --pos-host-tag-dark: rgba(15,23,42,0.92);
  --pos-host-tag-green: rgba(16,185,129,0.92);
}

.pos-host-shell{
  color: var(--pos-host-text);
}

.pos-host-toolbar,
.pos-host-rail-card,
.pos-host-stage-card,
.pos-host-inspector-card,
.pos-host-kpi,
.pos-host-row,
.pos-host-check,
.pos-host-card,
.pos-host-selection-card,
.pos-host-summary-note,
.pos-host-summary-card,
.pos-host-timeline,
.pos-host-area-select-wrap,
.pos-host-search-wrap,
.pos-host-toolbar-group,
.pos-host-date-pill,
.pos-host-live-pill,
.pos-host-count-pill,
.pos-host-alert-pill,
.pos-host-zoom-pill,
.pos-host-edit-banner{
  color: var(--pos-host-text);
}

.pos-host-toolbar,
.pos-host-rail-card,
.pos-host-stage-card,
.pos-host-inspector-card,
.pos-host-kpi{
  background: var(--pos-host-surface);
  border-color: var(--pos-host-border);
  box-shadow: var(--pos-host-shadow);
}

.pos-host-toolbar-group,
.pos-host-search-wrap,
.pos-host-area-select-wrap,
.pos-host-row,
.pos-host-check,
.pos-host-card,
.pos-host-selection-card,
.pos-host-summary-card,
.pos-host-summary-note{
  background: var(--pos-host-surface-2);
  border-color: var(--pos-host-border);
}

.pos-host-iconbtn,
.pos-host-segment,
.pos-host-chip,
.pos-host-row-btn,
.pos-host-timeline-label{
  border-color: var(--pos-host-border);
  background: var(--pos-host-surface-2);
  color: var(--pos-host-text);
  box-shadow: none;
}

.pos-host-iconbtn:hover,
.pos-host-segment:hover,
.pos-host-chip:hover,
.pos-host-row-btn:hover,
.pos-host-timeline-label:hover,
.pos-host-map-item:hover,
.pos-host-card:hover,
.pos-host-row:hover,
.pos-host-check:hover{
  border-color: var(--pos-host-active-border);
  box-shadow: 0 14px 26px rgba(15,23,42,0.08);
}

html[data-theme="dark"] .pos-host-iconbtn:hover,
html[data-theme="dark"] .pos-host-segment:hover,
html[data-theme="dark"] .pos-host-chip:hover,
html[data-theme="dark"] .pos-host-row-btn:hover,
html[data-theme="dark"] .pos-host-timeline-label:hover,
html[data-theme="dark"] .pos-host-map-item:hover,
html[data-theme="dark"] .pos-host-card:hover,
html[data-theme="dark"] .pos-host-row:hover,
html[data-theme="dark"] .pos-host-check:hover{
  box-shadow: 0 18px 34px rgba(37,99,235,0.12);
}

.pos-host-segment.active,
.pos-host-chip.active,
#pos-host-layout-toggle.active{
  background: var(--pos-host-active-bg);
  border-color: var(--pos-host-active-border);
  color: var(--pos-host-text-strong);
}

html[data-theme="dark"] .pos-host-segment.active,
html[data-theme="dark"] .pos-host-chip.active,
html[data-theme="dark"] #pos-host-layout-toggle.active{
  color: #fff;
}

.pos-host-date-pill,
.pos-host-count-pill,
.pos-host-zoom-pill{
  background: var(--pos-host-surface-2);
  border-color: var(--pos-host-border);
  color: var(--pos-host-text-strong);
}

.pos-host-live-pill{
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.28);
  color: var(--pos-host-text-strong);
}

.pos-host-live-pill.is-future{
  background: rgba(var(--brand-blue-rgb),0.10);
  border-color: rgba(var(--brand-blue-rgb),0.24);
}

.pos-host-kpi span,
.pos-host-summary-card span,
.pos-host-selection-grid span,
.pos-host-card-line span,
.pos-host-mini,
.pos-mini,
.pos-host-card-meta,
.pos-host-selection-meta,
.pos-host-row-meta,
.pos-host-kpi small,
.pos-host-legend span,
.pos-host-timeline-corner,
.pos-host-timeline-hours span,
.pos-host-timeline-empty,
.pos-host-map-guest--muted,
.pos-host-search-icon{
  color: var(--pos-host-muted);
}

.pos-host-kpi strong,
.pos-host-summary-card strong,
.pos-host-section-title,
.pos-host-stage-title,
.pos-host-selection-title,
.pos-host-summary-note-title,
.pos-host-check-title,
.pos-host-card-title,
.pos-host-row-name,
.pos-host-check-total,
.pos-host-card-line strong,
.pos-host-selection-grid strong,
.pos-host-date-pill,
.pos-host-live-pill,
.pos-host-count-pill,
.pos-host-zoom-pill{
  color: var(--pos-host-text-strong);
}

.pos-host-search-input,
.pos-host-area-select{
  color: var(--pos-host-text-strong) !important;
}

.pos-host-search-input::placeholder{
  color: var(--pos-host-muted);
}

.pos-host-area-select{
  background: transparent !important;
}

.pos-host-stage-card{
  min-height: 820px;
}

.pos-host-stage-body,
.pos-host-view{
  min-height: 640px;
}

.pos-host-stage-foot{
  border-top-color: var(--pos-host-border);
}

.pos-host-legend-dot.available{ background: #94a3b8; }
.pos-host-legend-dot.reserved{ background: #a855f7; }
.pos-host-legend-dot.occupied{ background: #2563eb; }
.pos-host-legend-dot.alert{ background: #f59e0b; }

.pos-host-status{
  background: var(--pos-host-surface-3);
  border-color: var(--pos-host-border);
  color: var(--pos-host-text-strong);
}

.pos-host-status--booked,
.pos-host-status--reserved{
  background: rgba(168,85,247,0.12);
  border-color: rgba(168,85,247,0.28);
}

.pos-host-status--seated,
.pos-host-status--occupied{
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.28);
}

.pos-host-status--available{
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.26);
}

.pos-host-status--cancelled{
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.26);
}

.pos-host-status--completed{
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.26);
}

.pos-host-alert-pill{
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.28);
  color: #92400e;
}

html[data-theme="dark"] .pos-host-alert-pill{
  color: #fde68a;
}

.pos-host-timeline{
  border-color: var(--pos-host-border);
  background: var(--pos-host-stage-bg);
}

.pos-host-timeline-head{
  border-bottom-color: var(--pos-host-border);
  background: rgba(255,255,255,0.28);
}

html[data-theme="dark"] .pos-host-timeline-head{
  background: rgba(255,255,255,0.03);
}

.pos-host-timeline-row{
  border-bottom-color: var(--pos-host-border);
}

.pos-host-timeline-track::before{
  background: linear-gradient(90deg, var(--pos-host-grid) 1px, transparent 1px);
}

.pos-host-timeline-block{
  border-color: rgba(168,85,247,0.24);
  background: rgba(168,85,247,0.16);
  color: var(--pos-host-text-strong);
}

html[data-theme="dark"] .pos-host-timeline-block{
  color: #fff;
  border-color: rgba(255,255,255,0.12);
  background: rgba(168,85,247,0.22);
}

.pos-host-timeline-block--seated{
  background: rgba(37,99,235,0.16);
  border-color: rgba(37,99,235,0.24);
}

html[data-theme="dark"] .pos-host-timeline-block--seated{
  background: rgba(59,130,246,0.24);
}

.pos-host-timeline-block--completed{
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.24);
}

html[data-theme="dark"] .pos-host-timeline-block--completed{
  background: rgba(16,185,129,0.18);
}

.pos-host-timeline-block--cancelled{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.24);
}

html[data-theme="dark"] .pos-host-timeline-block--cancelled{
  background: rgba(239,68,68,0.18);
}

.pos-host-map-tools{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pos-host-zoom-pill{
  min-width: 72px;
}

.pos-host-edit-banner{
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-blue-rgb),0.24);
  background: rgba(var(--brand-blue-rgb),0.08);
  box-shadow: none;
  font-weight: 700;
}

html[data-theme="dark"] .pos-host-edit-banner{
  border-color: rgba(96,165,250,0.24);
  background: rgba(96,165,250,0.10);
}

.pos-host-map-scroll{
  position: relative;
  width: 100%;
  max-height: 640px;
  min-height: 640px;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid var(--pos-host-border);
  background: var(--pos-host-stage-bg);
  box-shadow: var(--pos-host-stage-shadow);
}

.pos-host-map-scroll::-webkit-scrollbar{
  width: 11px;
  height: 11px;
}

.pos-host-map-scroll::-webkit-scrollbar-thumb{
  background: rgba(148,163,184,0.38);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html[data-theme="dark"] .pos-host-map-scroll::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.18);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.pos-host-map-canvas{
  position: relative;
  min-width: 100%;
  min-height: 100%;
  margin: 0 auto;
}

.pos-host-map-canvas.is-editing{
  cursor: grab;
}

.pos-host-map-grid{
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background-image:
    linear-gradient(var(--pos-host-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--pos-host-grid) 1px, transparent 1px),
    linear-gradient(var(--pos-host-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--pos-host-grid-strong) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px;
  pointer-events: none;
}

.pos-host-map-empty{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 420px;
  padding: 16px 18px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed var(--pos-host-border-strong);
  background: rgba(255,255,255,0.70);
  color: var(--pos-host-muted);
  box-shadow: 0 12px 24px rgba(15,23,42,0.06);
}

html[data-theme="dark"] .pos-host-map-empty{
  background: rgba(15,23,42,0.72);
}

.pos-host-map-item{
  position: absolute;
  display: block;
  padding: 0;
  border: 1px solid var(--pos-host-available-border);
  background: var(--pos-host-available-bg);
  color: var(--pos-host-text-strong);
  overflow: visible;
  box-shadow: 0 14px 32px rgba(15,23,42,0.10);
  grid-column: auto;
  grid-row: auto;
}

html[data-theme="dark"] .pos-host-map-item{
  color: #fff;
}

.pos-host-map-item-inner{
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px 12px;
}

.pos-host-map-item.shape-round{
  border-radius: 999px;
}

.pos-host-map-item.shape-square{
  border-radius: 22px;
}

.pos-host-map-item.shape-rect,
.pos-host-map-item.shape-banquet{
  border-radius: 22px;
}

.pos-host-map-item.shape-diamond{
  border-radius: 28px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.pos-host-map-item--available{
  background: var(--pos-host-available-bg);
  border-color: var(--pos-host-available-border);
}

.pos-host-map-item--reserved{
  background: var(--pos-host-reserved-bg);
  border-color: var(--pos-host-reserved-border);
}

.pos-host-map-item--occupied{
  background: var(--pos-host-occupied-bg);
  border-color: var(--pos-host-occupied-border);
}

.pos-host-map-item.is-alert{
  box-shadow: var(--pos-host-alert-ring);
}

.pos-host-map-item.is-selected,
.pos-host-card.is-selected{
  box-shadow: var(--pos-host-selected-ring);
  border-color: var(--pos-host-active-border);
}

.pos-host-map-item.is-layout-editable{
  cursor: grab;
}

.pos-host-map-item.is-layout-editable:active{
  cursor: grabbing;
}

.pos-host-map-drag-hint,
.pos-host-map-party,
.pos-host-map-spend,
.pos-host-map-time{
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 18px rgba(15,23,42,0.12);
}

.pos-host-map-drag-hint{
  top: 8px;
  left: 8px;
  min-height: 20px;
  padding: 0 7px;
  font-size: 10px;
  background: rgba(var(--brand-blue-rgb),0.92);
}

.pos-host-map-party{
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pos-host-tag-dark);
}

.pos-host-map-spend{
  top: -12px;
  right: -8px;
  background: var(--pos-host-tag-green);
}

.pos-host-map-time{
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pos-host-tag-dark);
}

.pos-host-map-name{
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: inherit;
}

.pos-host-map-guest{
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: inherit;
  opacity: 0.95;
}

.pos-host-shell .btn-secondary{
  background: var(--pos-host-surface-2) !important;
  color: var(--pos-host-text-strong) !important;
  border: 1px solid var(--pos-host-border) !important;
  box-shadow: none !important;
}

.pos-host-shell .btn-secondary:hover{
  background: var(--pos-host-soft) !important;
  border-color: var(--pos-host-active-border) !important;
}

.pos-host-shell .btn-primary{
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 980px){
  .pos-host-map-tools{
    width: 100%;
    justify-content: flex-start;
  }

  .pos-host-map-scroll{
    max-height: 560px;
    min-height: 560px;
  }
}

@media (max-width: 720px){
  .pos-host-map-scroll{
    max-height: 480px;
    min-height: 480px;
  }

  .pos-host-map-item{
    min-width: 74px;
  }

  .pos-host-map-name{
    font-size: 16px;
  }
}

/* -------------------------------------------------------------------------- */
/* Restaurant tables editor simplification                                      */
/* Drag to move, drag handles to resize, no width/height typing                */
/* -------------------------------------------------------------------------- */

.pos-host-map-canvas.is-editing{
  touch-action:none;
}

.pos-host-map-item.is-layout-editable{
  touch-action:none;
}

.pos-host-map-item.is-layout-editable .pos-host-map-item-inner{
  padding:16px 16px 24px;
}

.pos-host-area-chip{
  position:absolute;
  left:16px;
  bottom:16px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--pos-host-border);
  background:rgba(255,255,255,0.86);
  color:var(--pos-host-text-strong);
  box-shadow:0 12px 22px rgba(15,23,42,0.10);
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  backdrop-filter:blur(10px);
}

html[data-theme="dark"] .pos-host-area-chip{
  background:rgba(15,23,42,0.84);
  color:#fff;
}

.pos-host-area-resize-handle,
.pos-host-map-size-handle{
  touch-action:none;
  user-select:none;
}

.pos-host-area-resize-handle{
  position:absolute;
  right:16px;
  bottom:16px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:0 12px 0 14px;
  border-radius:999px;
  border:1px solid var(--pos-host-border);
  background:rgba(255,255,255,0.88);
  color:var(--pos-host-text-strong);
  box-shadow:0 16px 26px rgba(15,23,42,0.12);
  cursor:nwse-resize;
  backdrop-filter:blur(12px);
}

html[data-theme="dark"] .pos-host-area-resize-handle{
  background:rgba(15,23,42,0.88);
  color:#fff;
}

.pos-host-area-resize-handle span{
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.pos-host-area-resize-handle i{
  position:relative;
  width:18px;
  height:18px;
  display:block;
  border-radius:999px;
  background:linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  box-shadow:0 10px 18px rgba(37,99,235,0.18);
}

.pos-host-area-resize-handle i::before,
.pos-host-area-resize-handle i::after,
.pos-host-map-size-handle::before,
.pos-host-map-size-handle::after{
  content:"";
  position:absolute;
  right:4px;
  bottom:4px;
  border-right:2px solid rgba(255,255,255,0.95);
  border-bottom:2px solid rgba(255,255,255,0.95);
  border-radius:1px;
}

.pos-host-area-resize-handle i::before,
.pos-host-map-size-handle::before{
  width:7px;
  height:7px;
}

.pos-host-area-resize-handle i::after,
.pos-host-map-size-handle::after{
  width:4px;
  height:4px;
  right:7px;
  bottom:7px;
}

.pos-host-map-size-handle{
  position:absolute;
  right:8px;
  bottom:8px;
  z-index:3;
  width:20px;
  height:20px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  box-shadow:0 10px 18px rgba(15,23,42,0.16);
  cursor:nwse-resize;
}

.pos-host-map-item.shape-round .pos-host-map-size-handle{
  right:12px;
  bottom:12px;
}

.pos-host-map-item.shape-diamond .pos-host-map-size-handle{
  right:18px;
  bottom:18px;
}

.pos-host-area-resize-handle:hover,
.pos-host-map-size-handle:hover{
  transform:translateY(-1px);
}

@media (max-width: 980px){
  .pos-host-area-chip,
  .pos-host-area-resize-handle{
    bottom:12px;
  }

  .pos-host-area-resize-handle span{
    display:none;
  }
}

/* -------------------------------------------------------------------------- */
/* Restaurant tables rework: mature floor map, realistic tables, light mode   */
/* -------------------------------------------------------------------------- */

html:not([data-theme="dark"]) .pos-host-shell{
  --pos-host-stage-bg: linear-gradient(180deg, #fbfdff 0%, #eef5ff 100%);
  --pos-host-stage-fill: rgba(255,255,255,0.98);
  --pos-host-grid: rgba(148,163,184,0.14);
  --pos-host-grid-strong: rgba(100,116,139,0.08);
}

.pos-host-map-scroll{
  background: var(--pos-host-stage-bg) !important;
}

.pos-host-map-canvas::before{
  content:"";
  position:absolute;
  inset:18px;
  border-radius:28px;
  border:1px dashed rgba(148,163,184,0.26);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.66), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 22%),
    linear-gradient(180deg, rgba(15,23,42,0.024), rgba(15,23,42,0.01));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
  pointer-events:none;
}

html[data-theme="dark"] .pos-host-map-canvas::before{
  border-color: rgba(255,255,255,0.10);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(2,8,23,0.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.pos-host-map-item,
.pos-host-map-item:hover,
html[data-theme="dark"] .pos-host-map-item,
html[data-theme="dark"] .pos-host-map-item:hover{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.pos-host-map-item.shape-round,
.pos-host-map-item.shape-square,
.pos-host-map-item.shape-rect,
.pos-host-map-item.shape-banquet,
.pos-host-map-item.shape-diamond{
  border-radius: 0 !important;
  clip-path: none !important;
}

.pos-host-map-item{
  --host-table-accent:#94a3b8;
  --host-table-accent-soft: rgba(148,163,184,0.22);
  --host-table-surface: linear-gradient(180deg, #f8fafc 0%, #e5ebf5 100%);
  --host-table-surface-edge: rgba(15,23,42,0.12);
  --host-table-chair: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --host-table-chair-border: rgba(15,23,42,0.14);
  --host-table-label: #0f172a;
  --host-table-shadow: 0 16px 28px rgba(15,23,42,0.14);
  overflow: visible;
  isolation: isolate;
}

html[data-theme="dark"] .pos-host-map-item{
  --host-table-surface: linear-gradient(180deg, #4b5565 0%, #334155 100%);
  --host-table-surface-edge: rgba(255,255,255,0.10);
  --host-table-chair: linear-gradient(180deg, #475569 0%, #334155 100%);
  --host-table-chair-border: rgba(255,255,255,0.10);
  --host-table-label: #f8fafc;
  --host-table-shadow: 0 18px 34px rgba(2,8,23,0.30);
}

.pos-host-map-item--reserved{
  --host-table-accent:#c084fc;
  --host-table-accent-soft: rgba(192,132,252,0.28);
}

.pos-host-map-item--occupied{
  --host-table-accent:#60a5fa;
  --host-table-accent-soft: rgba(96,165,250,0.28);
}

.pos-host-map-item--available{
  --host-table-accent:#94a3b8;
  --host-table-accent-soft: rgba(148,163,184,0.22);
}

.pos-host-map-scene{
  position:relative;
  display:block;
  width:100%;
  height:100%;
}

.pos-host-map-item:hover .pos-host-map-scene{
  transform: translateY(-1px);
}

.pos-host-map-item.is-layout-editable .pos-host-map-scene{
  cursor: grab;
}

.pos-host-map-item.is-layout-editable:active .pos-host-map-scene{
  cursor: grabbing;
}

.pos-host-map-tabletop{
  position:absolute;
  left:50%;
  top:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pos-host-map-tabletop-surface{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  border:1px solid var(--host-table-surface-edge);
  background: var(--host-table-surface);
  box-shadow:
    var(--host-table-shadow),
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -10px 16px rgba(15,23,42,0.05);
}

html[data-theme="dark"] .pos-host-map-tabletop-surface{
  box-shadow:
    var(--host-table-shadow),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 16px rgba(2,8,23,0.20);
}

.pos-host-map-tabletop::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius: inherit;
  border:2px solid var(--host-table-accent-soft);
  opacity:0.95;
  pointer-events:none;
}

.pos-host-map-tabletop.shape-round{
  width:56%;
  height:56%;
  border-radius:999px;
  transform:translate(-50%, -54%);
}

.pos-host-map-tabletop.shape-round .pos-host-map-tabletop-surface{
  border-radius:999px;
}

.pos-host-map-tabletop.shape-square{
  width:56%;
  height:56%;
  border-radius:20px;
  transform:translate(-50%, -54%);
}

.pos-host-map-tabletop.shape-square .pos-host-map-tabletop-surface{
  border-radius:20px;
}

.pos-host-map-tabletop.shape-rect{
  width:68%;
  height:39%;
  border-radius:18px;
  transform:translate(-50%, -53%);
}

.pos-host-map-tabletop.shape-rect .pos-host-map-tabletop-surface{
  border-radius:18px;
}

.pos-host-map-tabletop.shape-banquet{
  width:76%;
  height:34%;
  border-radius:18px;
  transform:translate(-50%, -53%);
}

.pos-host-map-tabletop.shape-banquet .pos-host-map-tabletop-surface{
  border-radius:18px;
}

.pos-host-map-tabletop.shape-diamond{
  width:58%;
  height:58%;
  border-radius:18px;
  transform:translate(-50%, -54%) rotate(45deg);
}

.pos-host-map-tabletop.shape-diamond .pos-host-map-tabletop-surface{
  border-radius:18px;
}

.pos-host-map-tablecode{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 0;
  max-width: 88%;
  padding: 0 6px;
  font-size:15px;
  line-height:1;
  font-weight:900;
  letter-spacing:0.02em;
  color:var(--host-table-label);
  text-align:center;
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap;
}

.pos-host-map-tabletop.shape-diamond .pos-host-map-tablecode{
  transform: rotate(-45deg);
}

.pos-host-map-chair{
  position:absolute;
  width:17%;
  height:14%;
  min-width:12px;
  min-height:12px;
  max-width:24px;
  max-height:20px;
  transform:translate(-50%, -50%) rotate(var(--chair-rotate, 0deg));
  border-radius:12px;
  background: var(--host-table-chair);
  border:1px solid var(--host-table-chair-border);
  box-shadow: 0 10px 18px rgba(15,23,42,0.12);
}

html[data-theme="dark"] .pos-host-map-chair{
  box-shadow: 0 10px 18px rgba(2,8,23,0.24);
}

.pos-host-map-chair::after{
  content:"";
  position:absolute;
  inset:22% 18%;
  border-radius:999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.08));
  opacity:0.9;
}

.pos-host-map-item.shape-round .pos-host-map-chair{
  border-radius:999px;
}

.pos-host-map-item.is-selected .pos-host-map-tabletop-surface,
.pos-host-map-item.is-selected .pos-host-map-chair{
  border-color: var(--host-table-accent);
}

.pos-host-map-item.is-selected .pos-host-map-tabletop-surface{
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.82),
    0 0 0 6px var(--host-table-accent-soft),
    var(--host-table-shadow),
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -10px 16px rgba(15,23,42,0.05);
}

html[data-theme="dark"] .pos-host-map-item.is-selected .pos-host-map-tabletop-surface{
  box-shadow:
    0 0 0 3px rgba(15,23,42,0.84),
    0 0 0 6px var(--host-table-accent-soft),
    var(--host-table-shadow),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 16px rgba(2,8,23,0.20);
}

.pos-host-map-item.is-alert .pos-host-map-tabletop-surface{
  box-shadow:
    0 0 0 3px rgba(245,158,11,0.10),
    0 0 0 6px rgba(245,158,11,0.16),
    var(--host-table-shadow),
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -10px 16px rgba(15,23,42,0.05);
}

.pos-host-map-caption{
  position:absolute;
  left:50%;
  bottom:8px;
  transform:translateX(-50%);
  max-width:calc(100% - 20px);
  min-height:22px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background: rgba(255,255,255,0.82);
  color: var(--host-table-label);
  font-size:11px;
  font-weight:800;
  line-height:1;
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap;
  box-shadow: 0 8px 16px rgba(15,23,42,0.08);
}

html[data-theme="dark"] .pos-host-map-caption{
  background: rgba(15,23,42,0.78);
  color: #f8fafc;
  box-shadow: 0 10px 18px rgba(2,8,23,0.24);
}

.pos-host-map-caption.is-muted{
  color: var(--pos-host-muted);
}

.pos-host-map-drag-hint,
.pos-host-map-party,
.pos-host-map-spend,
.pos-host-map-time{
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  color:#fff;
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:0 10px 18px rgba(15,23,42,0.14);
  z-index:2;
}

.pos-host-map-drag-hint{
  top:6px;
  left:6px;
  min-height:19px;
  padding:0 7px;
  background: rgba(37,99,235,0.94);
}

.pos-host-map-party{
  top:-8px;
  left:-4px;
  background: rgba(15,23,42,0.90);
}

.pos-host-map-spend{
  top:-8px;
  right:-4px;
  background: rgba(22,163,74,0.94);
}

.pos-host-map-time{
  right:8px;
  bottom:34px;
  background: rgba(15,23,42,0.86);
}

.pos-host-map-item.is-compact .pos-host-map-caption{
  display:none;
}

.pos-host-map-item.is-compact .pos-host-map-time{
  bottom:8px;
}

.pos-host-map-item.is-micro .pos-host-map-drag-hint,
.pos-host-map-item.is-micro .pos-host-map-time,
.pos-host-map-item.is-micro .pos-host-map-caption{
  display:none;
}

.pos-host-map-item.is-micro .pos-host-map-party,
.pos-host-map-item.is-micro .pos-host-map-spend{
  min-height:20px;
  padding:0 7px;
  font-size:9px;
}

.pos-host-map-item.is-compact .pos-host-map-tablecode{
  font-size:13px;
}

.pos-host-map-item.is-micro .pos-host-map-tablecode{
  font-size:12px;
}

.pos-host-area-chip{
  left:18px;
  bottom:18px;
  z-index:4;
  background:rgba(255,255,255,0.92);
  border-color:rgba(148,163,184,0.22);
}

html[data-theme="dark"] .pos-host-area-chip{
  background:rgba(15,23,42,0.88);
  border-color:rgba(255,255,255,0.10);
}

.pos-host-area-resize-handle{
  z-index:4;
}

@media (max-width: 980px){
  .pos-host-map-item .pos-host-map-caption{
    display:none;
  }
  .pos-host-map-item .pos-host-map-time{
    bottom:8px;
  }
}

@media (max-width: 720px){
  .pos-host-map-chair{
    min-width:10px;
    min-height:10px;
    max-width:18px;
    max-height:16px;
  }
  .pos-host-map-tablecode{
    font-size:12px;
  }
}


/* -------------------------------------------------------------------------- */
/* Restaurant host board sizing hotfix                                         */
/* Neutralize legacy full-height grid rules so tables keep their real size.    */
/* -------------------------------------------------------------------------- */

.pos-host-map-item{
  width:auto;
  min-width:0 !important;
  min-height:0 !important;
  max-height:none !important;
  align-self:auto !important;
  justify-self:auto !important;
}

.pos-host-map-scene{
  min-height:0;
}

.pos-host-map-tabletop.shape-round{
  width:58%;
  height:58%;
}

.pos-host-map-tabletop.shape-square{
  width:58%;
  height:58%;
}

.pos-host-map-tabletop.shape-rect{
  width:72%;
  height:52%;
}

.pos-host-map-tabletop.shape-banquet{
  width:76%;
  height:48%;
}

.pos-host-map-tabletop.shape-diamond{
  width:60%;
  height:60%;
}

.pos-host-map-chair{
  width:15%;
  height:13%;
  min-width:11px;
  min-height:11px;
  max-width:20px;
  max-height:18px;
}

.pos-host-map-caption{
  bottom:6px;
}

.pos-host-map-time{
  bottom:30px;
}


/* -------------------------------------------------------------------------- */
/* Shop fulfillment operations                                                 */
/* -------------------------------------------------------------------------- */
.shop-kv{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:10px 0;
  border-bottom:1px dashed var(--border);
}
.shop-kv:last-child{border-bottom:none}
.shop-kv b{font-weight:800}
.shop-kv span{flex:1;text-align:right}

.shop-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  text-transform:capitalize;
}
.shop-badge-ok{background:rgba(16,185,129,.12) !important;border-color:rgba(16,185,129,.22) !important;color:#047857 !important}
.shop-badge-info{background:rgba(59,130,246,.12) !important;border-color:rgba(59,130,246,.22) !important;color:#1d4ed8 !important}
.shop-badge-warn{background:rgba(245,158,11,.12) !important;border-color:rgba(245,158,11,.22) !important;color:#b45309 !important}
.shop-badge-bad{background:rgba(239,68,68,.12) !important;border-color:rgba(239,68,68,.22) !important;color:#b91c1c !important}
.shop-badge-muted{background:rgba(148,163,184,.14) !important;border-color:rgba(148,163,184,.24) !important;color:#475569 !important}

html[data-theme="dark"] .shop-badge-ok{color:#6ee7b7 !important}
html[data-theme="dark"] .shop-badge-info{color:#93c5fd !important}
html[data-theme="dark"] .shop-badge-warn{color:#fcd34d !important}
html[data-theme="dark"] .shop-badge-bad{color:#fca5a5 !important}
html[data-theme="dark"] .shop-badge-muted{color:#cbd5e1 !important}

.shop-order-modal-xl{max-height:80vh;overflow:auto;padding-right:4px}
.shop-order-summary-strip{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
.shop-order-summary-pill,
.shop-order-progress-row,
.shop-shipment-card,
.shop-order-timeline-item,
.shop-order-form-line{
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.58);
  padding:12px 14px;
}
html[data-theme="dark"] .shop-order-summary-pill,
html[data-theme="dark"] .shop-order-progress-row,
html[data-theme="dark"] .shop-shipment-card,
html[data-theme="dark"] .shop-order-timeline-item,
html[data-theme="dark"] .shop-order-form-line{
  background:rgba(15,23,42,.44);
}
.shop-order-summary-pill{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.shop-order-summary-pill strong{font-size:18px}
.shop-order-progress-list,
.shop-shipments-list,
.shop-order-timeline,
.shop-order-form-lines{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.shop-order-progress-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.shop-order-progress-name{font-weight:800}
.shop-order-progress-right{display:flex;align-items:center}
.shop-shipment-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.shop-shipment-title{font-weight:900}
.shop-shipment-track{margin-top:8px;font-weight:700;word-break:break-word}
.shop-shipment-dates{margin-top:8px}
.shop-shipment-note{margin-top:8px}
.shop-shipment-items{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:12px;
}
.shop-shipment-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px dashed var(--border);
}
.shop-shipment-item:last-child{border-bottom:none}
.shop-shipment-actions,
.shop-shipment-form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.shop-shipment-form-actions{justify-content:flex-end}
.shop-order-form-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.shop-order-form-line-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.shop-order-form-line .input{
  width:108px;
  min-width:108px;
}
.shop-link{
  color:var(--brand-blue);
  font-weight:800;
  text-decoration:none;
}
.shop-link:hover{text-decoration:underline}
.shop-order-timeline-title{font-weight:900}
.shop-order-timeline-detail{margin-top:6px}
.shop-order-modal-head .shop-order-modal-actions{align-items:center}

@media (max-width: 960px){
  .shop-order-summary-strip{grid-template-columns:repeat(2, minmax(0, 1fr))}
}
@media (max-width: 720px){
  .shop-kv{flex-direction:column}
  .shop-kv span{text-align:left}
  .shop-order-summary-strip{grid-template-columns:1fr}
  .shop-order-progress-row,
  .shop-order-form-line,
  .shop-shipment-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .shop-order-form-line .input{width:100%;min-width:0}
}

/* Shop returns & exchanges */
.shop-return-summary-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
  margin-bottom:12px;
}
.shop-return-stack,
.shop-return-lines{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.shop-return-card,
.shop-return-line{
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.58);
}
html[data-theme="dark"] .shop-return-card,
html[data-theme="dark"] .shop-return-line{
  background:rgba(15,23,42,.44);
}
.shop-return-card{padding:14px}
.shop-return-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.shop-return-title{font-weight:900}
.shop-return-meta{margin-top:2px}
.shop-return-kv-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.shop-return-note{
  margin-top:10px;
  font-size:13px;
  line-height:1.45;
}
.shop-return-linkrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.shop-return-items{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:12px;
}
.shop-return-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px dashed var(--border);
}
.shop-return-item:last-child{border-bottom:none}
.shop-return-actions,
.shop-return-form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.shop-return-form-actions{justify-content:flex-end}
.shop-return-form{margin-top:10px}
.shop-return-live-total{margin-top:10px}
.shop-return-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
}
.shop-return-line-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.shop-return-line-controls{
  display:grid;
  grid-template-columns:repeat(2, minmax(100px, 120px));
  gap:10px;
}
.shop-return-line-controls .input{
  width:100%;
  min-width:0;
}
@media (max-width: 960px){
  .shop-return-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 720px){
  .shop-return-kv-row,
  .shop-return-summary-strip{grid-template-columns:1fr}
  .shop-return-head,
  .shop-return-line{flex-direction:column;align-items:flex-start}
  .shop-return-line-controls{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
}
@media (max-width: 520px){
  .shop-return-line-controls{grid-template-columns:1fr}
}

/* Draft orders & invoice links */
.shop-orders-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.shop-grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.shop-draft-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  border:1px solid rgba(17,24,39,.08);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.shop-draft-row + .shop-draft-row{ margin-top:12px; }
.shop-draft-row:hover{
  transform:translateY(-1px);
  border-color:rgba(79,70,229,.24);
  box-shadow:0 12px 28px rgba(17,24,39,.08);
}
.shop-draft-main{ flex:1; min-width:0; }
.shop-draft-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.shop-draft-side{
  display:flex;
  align-items:flex-end;
  gap:10px;
  flex-direction:column;
}
.shop-draft-total{
  font-size:18px;
  font-weight:900;
  letter-spacing:-.02em;
}
.shop-draft-actions-inline,
.shop-draft-footer-buttons,
.shop-draft-line-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.shop-draft-modal .shop-order-modal-head{ margin-bottom:6px; }
.shop-draft-grid{
  display:grid;
  grid-template-columns:1.25fr .85fr;
  gap:12px;
}
.shop-draft-address-wrap.hidden{ display:none !important; }
.shop-draft-summary-box{
  margin-top:12px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(79,70,229,.16);
  background:rgba(79,70,229,.06);
}
.shop-draft-summary-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
}
.shop-draft-summary-total{
  margin-top:4px;
  padding-top:10px;
  border-top:1px dashed rgba(17,24,39,.12);
}
.shop-draft-summary-note{ margin-top:8px; line-height:1.45; }
.shop-draft-lines{ display:flex; flex-direction:column; gap:12px; }
.shop-draft-line-row{
  border:1px solid rgba(17,24,39,.08);
  border-radius:16px;
  padding:14px;
  background:rgba(248,250,252,.8);
}
.shop-draft-line-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 110px 120px auto;
  gap:10px;
  align-items:end;
}
.shop-draft-line-price{
  min-width:0;
}
.shop-draft-line-price label{ display:block; margin-bottom:8px; color:var(--muted,#6b7280); font-size:12px; }
.shop-draft-line-price-value{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  font-weight:800;
}
.shop-draft-line-remove-wrap{ display:flex; align-items:center; }
.shop-draft-line-sub{ margin-top:8px; line-height:1.4; }
.shop-draft-footer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

html[data-theme="dark"] .shop-draft-row,
html[data-theme="dark"] .shop-draft-line-row,
html[data-theme="dark"] .shop-draft-line-price-value{
  background:rgba(15,23,42,.88);
  border-color:rgba(148,163,184,.18);
}
html[data-theme="dark"] .shop-draft-summary-box{
  background:rgba(79,70,229,.15);
  border-color:rgba(129,140,248,.24);
}

@media (max-width: 980px){
  .shop-draft-grid,
  .shop-grid-3{ grid-template-columns:1fr; }
  .shop-draft-line-grid{ grid-template-columns:1fr 1fr; }
  .shop-draft-line-qty-wrap,
  .shop-draft-line-price,
  .shop-draft-line-remove-wrap{ grid-column:span 1; }
}
@media (max-width: 760px){
  .shop-orders-toolbar,
  .shop-draft-row,
  .shop-draft-footer-actions{ flex-direction:column; align-items:stretch; }
  .shop-draft-side{ align-items:stretch; }
  .shop-draft-line-grid{ grid-template-columns:1fr; }
}

/* -------------------------------------------------------------------------- */
/* Shemify uploaded brand assets                                               */
/* -------------------------------------------------------------------------- */
header.app-header .brand-mark.brand-mark-image-wrap,
.nui-sidebar-brand .nui-sidebar-brand-mark{
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: hidden;
}

header.app-header .brand-mark.brand-mark-image-wrap{
  border-radius: 18px !important;
}

header.app-header .brand-mark-image,
.nui-sidebar-brand .nui-sidebar-brand-mark img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

header.app-header .brand-wordmark{
  display: block;
  width: min(184px, 100%);
  max-width: 184px;
  height: auto;
}

.nui-sidebar-brand-wordmark{
  display: block;
  width: 138px;
  max-width: 100%;
  height: auto;
}

.nui-sidebar-brand-title{
  display: flex;
  align-items: center;
  line-height: 1;
}

/* -------------------------------------------------------------------------- */
/* Dedicated catalog / coupons surfaces                                        */
/* -------------------------------------------------------------------------- */
.workspace-standalone-page{
  width: 100%;
}

.workspace-standalone-shell{
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 14px 14px;
}

.workspace-standalone-body{
  min-height: 120px;
}

.workspace-standalone-body > .settings-panel{
  display: block;
}

.workspace-standalone-body > .settings-panel.hidden{
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Remove nested online-store submenu                                          */
/* -------------------------------------------------------------------------- */
#shop-page:not(.shop-workspace-route) .shop-admin-layout{
  grid-template-columns: 1fr !important;
}

#shop-page:not(.shop-workspace-route) .shop-admin-nav{
  display: none !important;
}

#shop-page.shop-workspace-route .shop-admin-layout{
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) !important;
}

#shop-page.shop-workspace-route .shop-admin-nav{
  display: block !important;
}

#shop-page.shop-workspace-route .shop-nav-section + .shop-nav-section{
  margin-top: 10px;
}

@media (max-width: 980px){
  #shop-page.shop-workspace-route .shop-admin-layout{
    grid-template-columns: 1fr !important;
  }

  #shop-page.shop-workspace-route .shop-admin-nav{
    position: static !important;
    margin-bottom: 12px;
  }
}

/* -------------------------------------------------------------------------- */
/* Workspace route loader (adapted from uploaded UI pack)                      */
/* -------------------------------------------------------------------------- */
.workspace-loader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--brand-red-rgb), 0.16) 0, transparent 40%),
    radial-gradient(circle at 84% 10%, rgba(var(--brand-blue-rgb), 0.18) 0, transparent 42%),
    rgba(5, 8, 22, 0.78);
  backdrop-filter: blur(14px);
  transition: opacity .28s ease, visibility .28s ease;
}

.workspace-loader.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.workspace-loader-card{
  min-width: 240px;
  max-width: 360px;
  padding: 22px 24px 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(11, 16, 32, 0.92);
  box-shadow: 0 28px 68px -28px rgba(2, 6, 23, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.workspace-loader-mark{
  width: 62px;
  height: 62px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 36px -22px rgba(var(--brand-blue-rgb), 0.58);
}

.workspace-loader-mark img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.workspace-loader-spinner{
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(var(--brand-blue-rgb), 1) 55%, rgba(var(--brand-red-rgb), 1) 100%);
  animation: shemify-workspace-spin 1s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
}

.workspace-loader-spinner::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--brand-blue-rgb), 1), rgba(var(--brand-red-rgb), 1));
  filter: blur(10px);
  opacity: 0.48;
  z-index: -1;
}

.workspace-loader-text{
  font-family: Rajdhani, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.96);
  animation: shemify-workspace-pulse 1.8s ease-in-out infinite;
}

@keyframes shemify-workspace-spin{
  to { transform: rotate(360deg); }
}

@keyframes shemify-workspace-pulse{
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(0.98); }
}

/* -------------------------------------------------------------------------- */
/* Minimal workspace chrome cleanup                                            */
/* -------------------------------------------------------------------------- */
body.sf-minimal-workspace-chrome #dashboard-section .content{
  padding-top: 10px !important;
}

body.sf-minimal-workspace-chrome #dashboard-section .content-header,
body.sf-minimal-workspace-chrome #dashboard-section .content-tagline,
body.sf-minimal-workspace-chrome #nui-page-hero{
  display: none !important;
}

body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header{
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header > div:first-child,
body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header .topbar-actions,
body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header .label-pill{
  display: none !important;
}

body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header > div:last-child{
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0 !important;
}

body.sf-minimal-workspace-chrome.sf-minimal-workspace-admin-return #dashboard-section .content-header #back-to-admin-btn{
  display: inline-flex !important;
  margin: 0 !important;
}

/* ---- FINAL: POS checkout button must be solid brand-blue ---- */
#pos-checkout-btn,
#pos-checkout-btn.btn-primary,
button#pos-checkout-btn{
  background: #15399A !important;
  background-image: none !important;
  background-size: auto !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 8px 24px -6px rgba(21, 57, 154, 0.45) !important;
}
#pos-checkout-btn:hover,
button#pos-checkout-btn:hover{
  background: #1a4fc7 !important;
  background-image: none !important;
  box-shadow: 0 12px 32px -6px rgba(21, 57, 154, 0.58) !important;
  transform: translateY(-1px) !important;
}
#pos-checkout-btn:active,
button#pos-checkout-btn:active{
  transform: translateY(0) !important;
  box-shadow: 0 4px 12px -4px rgba(21, 57, 154, 0.30) !important;
}
