@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

[x-cloak] {
  display: none !important;
}

/* ── PWA / native-like shell (touch, overscroll, tap highlight) ── */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  -webkit-tap-highlight-color: rgba(32, 152, 158, 0.15);
}
.app-shell-main {
  overscroll-behavior-y: contain;
}

/* Mobile bottom tab bar footprint (must match .app-mobile-bottom-nav padding) */
:root {
  --app-mobile-tab-inner: 5rem;
  --app-mobile-tab-safe: max(0.35rem, env(safe-area-inset-bottom, 0px));
  --app-mobile-tab-stack: calc(var(--app-mobile-tab-inner) + var(--app-mobile-tab-safe));
}

.app-mobile-tab-track {
  position: relative;
  display: flex;
  align-items: stretch;
  touch-action: manipulation;
}

.app-mobile-tab-liquid {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 0;
  border-radius: 1rem;
  background: rgba(32, 152, 158, 0.16);
  border: 1px solid rgba(32, 152, 158, 0.22);
  box-shadow: 0 4px 20px rgba(32, 152, 158, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.42s cubic-bezier(0.34, 1.45, 0.64, 1),
    width 0.35s cubic-bezier(0.34, 1.45, 0.64, 1);
  pointer-events: none;
  will-change: transform, width;
  z-index: 0;
}

.app-mobile-tab-liquid--emphasis {
  transform-origin: center center;
}

.dark .app-mobile-tab-liquid {
  background: rgba(32, 152, 158, 0.22);
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.app-mobile-tab-item {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.25rem;
  border: none;
  background: transparent;
  color: rgb(107 114 128);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.dark .app-mobile-tab-item {
  color: rgb(156 163 175);
}

.app-mobile-tab-item[aria-selected="true"] {
  color: rgb(32 152 158);
}

.dark .app-mobile-tab-item[aria-selected="true"] {
  color: rgb(94 234 212);
}

@media (prefers-reduced-motion: reduce) {
  .app-mobile-tab-liquid {
    transition: transform 0.15s ease, width 0.15s ease;
  }
}

@media (max-width: 1023px) {
  .app-shell-content-mobile-pad {
    padding-bottom: var(--app-mobile-tab-stack);
  }
}

.app-toast-stack {
  bottom: 1rem;
}
@media (max-width: 1023px) {
  .app-toast-stack {
    bottom: calc(var(--app-mobile-tab-stack) + 1rem);
  }
}

/* Bottom action sheet sits above the tab bar */
.app-mobile-more-sheet {
  bottom: var(--app-mobile-tab-stack);
  max-height: min(85vh, calc(100dvh - var(--app-mobile-tab-stack) - 0.5rem));
}

/* ═══ Glassmorphism design tokens ═══ */
.glass {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
}
.dark .glass {
  background: rgba(30, 41, 59, 0.48);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}
.dark .glass-strong {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-sidebar {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 4px 0 32px rgba(31, 38, 135, 0.06);
}
.dark .glass-sidebar {
  background: rgba(15, 23, 42, 0.45);
  border-right-color: rgba(255, 255, 255, 0.1);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.25);
}

.glass-topbar {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 24px rgba(31, 38, 135, 0.05);
}
.dark .glass-topbar {
  background: rgba(15, 23, 42, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.glass-input {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* White-on-white borders were invisible on light cards; use slate so fields read clearly */
  border: 1px solid rgb(203 213 225);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.glass-input:hover {
  border-color: rgb(148 163 184);
}
.glass-input:focus,
.glass-input:focus-visible {
  outline: none;
  border-color: rgb(32 152 158);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 3px rgba(32, 152, 158, 0.22);
}
.dark .glass-input {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.dark .glass-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.dark .glass-input:focus,
.dark .glass-input:focus-visible {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(32, 152, 158, 0.25);
}

/* Inventory filter drawer + active chips */
.inventory-filter-drawer-root {
  pointer-events: none;
}
.inventory-filter-drawer-root > * {
  pointer-events: auto;
}
.inventory-filter-drawer-panel {
  -webkit-overflow-scrolling: touch;
}
.inventory-filter-chip {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inventory list — extra bottom margin on mobile so pagination clears the tab bar */
@media (max-width: 1023px) {
  .inventory-pagination {
    margin-bottom: var(--app-mobile-tab-stack);
  }
}
@media (min-width: 1024px) {
  .inventory-pagination {
    margin-bottom: 2.5rem;
  }
}

.glass-inset {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.dark .glass-inset {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.08);
}

.glass-nav-active {
  background: rgba(32, 152, 158, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(32, 152, 158, 0.25);
}
.dark .glass-nav-active {
  background: rgba(32, 152, 158, 0.22);
  border-color: rgba(32, 152, 158, 0.35);
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.55);
}
.dark .glass-hover:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Scrollbar ── */
* {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.dark * { scrollbar-color: #4b5563 transparent; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.dark ::-webkit-scrollbar-thumb { background: #4b5563; }
.dark ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* ── Status ribbon (property cards) ── */
.status-ribbon {
  position: absolute;
  top: 12px;
  right: -34px;
  width: 120px;
  text-align: center;
  transform: rotate(45deg);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 0;
  letter-spacing: 0.5px;
}

/* ── Property card hover lift ── */
.property-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(31, 38, 135, 0.12);
}
.dark .property-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* ── Skeleton loading shimmer ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.35) 25%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0.35) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.dark .skeleton {
  background: linear-gradient(90deg, rgba(30,41,59,0.5) 25%, rgba(51,65,85,0.65) 50%, rgba(30,41,59,0.5) 75%);
  background-size: 200% 100%;
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Focus ring ── */
*:focus-visible {
  outline: 2px solid #20989e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Stat card top accent ── */
.stat-accent-indigo  { border-top: 3px solid #6366f1; }
.stat-accent-emerald { border-top: 3px solid #10b981; }
.stat-accent-amber   { border-top: 3px solid #f59e0b; }
.stat-accent-blue    { border-top: 3px solid #3b82f6; }
.stat-accent-purple  { border-top: 3px solid #a855f7; }
.stat-accent-pink    { border-top: 3px solid #ec4899; }
.stat-accent-teal    { border-top: 3px solid #14b8a6; }
.stat-accent-orange  { border-top: 3px solid #f97316; }

/* ── Gallery thumbnail active ring ── */
.gallery-thumb.active {
  box-shadow: 0 0 0 2px #20989e;
}

/* ── Entrance animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease-out both; }
.animate-slide-up { animation: slideUp 0.4s ease-out both; }

/* Portfolio CRM: role checkboxes in one row, compact */
.portfolio-role-checkboxes li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

/* ── Portfolio modals (Add asset / Add tenancy) ── */
.portfolio-modal-shell > form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portfolio-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 52rem);
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.dark .portfolio-modal-shell {
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.portfolio-modal-shell .portfolio-modal-head {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(
    135deg,
    rgba(32, 152, 158, 0.12) 0%,
    rgba(255, 255, 255, 0.4) 45%,
    rgba(255, 255, 255, 0.25) 100%
  );
}
.dark .portfolio-modal-shell .portfolio-modal-head {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    135deg,
    rgba(32, 152, 158, 0.18) 0%,
    rgba(30, 41, 59, 0.85) 50%,
    rgba(15, 23, 42, 0.9) 100%
  );
}

.portfolio-modal-shell .portfolio-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.25rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.portfolio-modal-shell .portfolio-modal-foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dark .portfolio-modal-shell .portfolio-modal-foot {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.88);
}

.portfolio-modal-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(26 125 130);
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.portfolio-modal-section-title::before {
  content: "";
  width: 3px;
  height: 0.85rem;
  border-radius: 2px;
  background: linear-gradient(180deg, rgb(32 152 158), rgb(61 187 192));
  flex-shrink: 0;
}
.dark .portfolio-modal-section-title {
  color: rgb(112 208 211);
}

.portfolio-modal-section-hint {
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgb(100 116 139);
  margin: -0.35rem 0 0.85rem;
  max-width: 42rem;
}
.dark .portfolio-modal-section-hint {
  color: rgb(148 163 184);
}

.portfolio-modal-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(51 65 85);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}
.dark .portfolio-modal-label {
  color: rgb(203 213 225);
}

.portfolio-modal-control.glass-input,
.portfolio-modal-shell select.glass-input,
.portfolio-modal-shell textarea.glass-input {
  border-radius: 0.625rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  border-width: 1px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portfolio-modal-shell textarea.glass-input {
  min-height: 0;
  line-height: 1.5;
}

.portfolio-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  color: rgb(100 116 139);
  transition: background 0.15s ease, color 0.15s ease;
}
.portfolio-modal-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgb(51 65 85);
}
.dark .portfolio-modal-close {
  color: rgb(148 163 184);
}
.dark .portfolio-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgb(226 232 240);
}

.portfolio-modal-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.625rem;
  background: linear-gradient(180deg, rgb(45 175 180) 0%, rgb(32 152 158) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(32, 152, 158, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.portfolio-modal-btn-primary:hover {
  filter: brightness(1.06);
}
.portfolio-modal-btn-primary:active {
  transform: translateY(1px);
}

.portfolio-modal-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.625rem;
  color: rgb(71 85 105);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.portfolio-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgb(148 163 184);
}
.dark .portfolio-modal-btn-secondary {
  color: rgb(203 213 225);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}
.dark .portfolio-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Global glass popup system ── */
.gm-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dark .gm-popup-backdrop {
  background: rgba(2, 6, 23, 0.55);
}

.gm-popup-shell {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gm-popup-card {
  width: min(100%, 34rem);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}
.dark .gm-popup-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.gm-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.dark .gm-popup-head {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.gm-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgb(15 23 42);
}
.dark .gm-popup-title {
  color: rgb(241 245 249);
}

.gm-popup-body {
  padding: 1rem 1.1rem;
  color: rgb(51 65 85);
  font-size: 0.875rem;
  line-height: 1.45;
}
.dark .gm-popup-body {
  color: rgb(203 213 225);
}

.gm-popup-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.45);
}
.dark .gm-popup-foot {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.62);
}

.gm-popup-btn {
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  transition: 150ms ease;
}
.gm-popup-btn-secondary {
  color: rgb(71 85 105);
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.7);
}
.gm-popup-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.92);
}
.dark .gm-popup-btn-secondary {
  color: rgb(203 213 225);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.dark .gm-popup-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.gm-popup-btn-primary {
  color: #fff;
  background: linear-gradient(180deg, rgb(45 175 180), rgb(32 152 158));
  border-color: rgba(255, 255, 255, 0.2);
}
.gm-popup-btn-primary:hover {
  filter: brightness(1.07);
}

.gm-popup-input {
  width: 100%;
  margin-top: 0.8rem;
  border-radius: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgb(203 213 225);
  background: rgba(255, 255, 255, 0.82);
  color: rgb(15 23 42);
}
.gm-popup-input:focus {
  outline: none;
  border-color: rgb(32 152 158);
  box-shadow: 0 0 0 3px rgba(32, 152, 158, 0.25);
}
.dark .gm-popup-input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: rgb(226 232 240);
}

/* ═══ Custom select (ui-select) — app-wide dropdown styling ═══ */
.ui-select {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}
.ui-select.ui-select--block {
  display: block;
  width: 100%;
}

.ui-select-native {
  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;
}

.ui-select-trigger {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.ui-select-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ui-select-trigger__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ui-select-trigger__chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: rgb(100 116 139);
  transition: transform 0.2s ease, color 0.15s ease;
}
.ui-select.is-open .ui-select-trigger__chevron {
  transform: rotate(180deg);
  color: rgb(32 152 158);
}
.dark .ui-select-trigger__chevron {
  color: rgb(148 163 184);
}
.dark .ui-select.is-open .ui-select-trigger__chevron {
  color: rgb(94 234 212);
}

.ui-select-menu {
  position: absolute;
  z-index: 200;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  min-width: 100%;
  max-height: min(16rem, 50vh);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgb(226 232 240);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.08),
    0 16px 40px -8px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 0.16s ease,
    transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1),
    visibility 0.16s ease;
}
.dark .ui-select-menu {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.35),
    0 20px 48px -8px rgba(0, 0, 0, 0.55);
}
.ui-select.is-open .ui-select-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.ui-select.is-open .ui-select-trigger {
  border-color: rgb(32 152 158);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 3px rgba(32, 152, 158, 0.2);
}
.dark .ui-select.is-open .ui-select-trigger {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(32, 152, 158, 0.28);
}

.ui-select-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  margin: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: rgb(30 41 59);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.ui-select-option:hover,
.ui-select-option:focus-visible {
  outline: none;
  background: rgba(32, 152, 158, 0.1);
  color: rgb(21 99 104);
}
.ui-select-option.is-selected {
  background: rgba(32, 152, 158, 0.14);
  color: rgb(32 152 158);
  font-weight: 600;
}
.ui-select-option.is-focused {
  background: rgba(32, 152, 158, 0.1);
}
.dark .ui-select-option {
  color: rgb(226 232 240);
}
.dark .ui-select-option:hover,
.dark .ui-select-option:focus-visible,
.dark .ui-select-option.is-focused {
  background: rgba(32, 152, 158, 0.22);
  color: rgb(167 243 239);
}
.dark .ui-select-option.is-selected {
  background: rgba(32, 152, 158, 0.28);
  color: rgb(94 234 212);
}

.inventory-filter-drawer-panel .ui-select-menu {
  z-index: 260;
}

/* Native selects (fallback / before JS, multiselect, data-native-select) */
select:not([multiple]):not([size]),
select[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2364748b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1.125rem 1.125rem;
  padding-right: 2.25rem !important;
  cursor: pointer;
}
.dark select:not([multiple]):not([size]),
.dark select[size="1"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2394a3b8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select:not([multiple]):not([size]):disabled,
select[size="1"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .ui-select-menu,
  .ui-select-trigger__chevron {
    transition: none;
  }
}

/* ── Reports hub (full width + HTML→PDF capture) ── */
.reports-hub-page {
  width: 100%;
  max-width: none;
}

/* KPI cards — subtle on screen, bold when exporting */
.report-kpi-card {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(148, 163, 184, 0.35);
}
.dark .report-kpi-card {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255, 255, 255, 0.1);
}
.report-kpi-indigo { border-left: 3px solid #6366f1; }
.report-kpi-emerald { border-left: 3px solid #10b981; }
.report-kpi-amber { border-left: 3px solid #f59e0b; }
.report-kpi-teal { border-left: 3px solid #0d9488; }
.report-kpi-slate { border-left: 3px solid #64748b; }

/* Reports PDF — Tailwind `pdf:` for layout; solid hero for html2canvas (gradients often fail). */
html.report-pdf-export-active {
  background: #fff !important;
}
html.report-pdf-export-active body {
  background: #fff !important;
}
html.report-pdf-export-active .glass-strong:has(#report-overview-export-root) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html.report-pdf-export-active .report-pdf-hero {
  background: #0f766e !important;
  color: #fff !important;
  padding: 1.25rem !important;
  border-radius: 12px !important;
}
html.report-pdf-export-active .report-pdf-hero .report-pdf-brand {
  color: #ccfbf1 !important;
  opacity: 1 !important;
}
html.report-pdf-export-active .report-pdf-hero .report-pdf-title,
html.report-pdf-export-active .report-pdf-hero .report-pdf-period {
  color: #fff !important;
}
html.report-pdf-export-active .report-pdf-hero .report-pdf-subtitle {
  color: #f0fdfa !important;
  opacity: 1 !important;
}
html.report-pdf-export-active .report-pdf-hero .report-pdf-footnote {
  color: #99f6e4 !important;
  opacity: 1 !important;
}
html.report-pdf-export-active .report-pdf-hero .report-pdf-period {
  display: block !important;
}
html.report-pdf-export-active .report-chart-card canvas {
  display: block;
  max-width: 100%;
}

/* ── Print ── */
@media print {
  .ui-select-menu {
    display: none !important;
  }
  .ui-select-native {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    margin: 0 !important;
  }
  .no-print  { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
}
