/* Shared Components: Forms, Buttons, Switches, Modals, Enterprise Select, Polaris Index Tables */

/* Toolbar */
.owner-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.owner-input, .owner-select, .owner-textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
  background: #ffffff;
}
.owner-input:focus, .owner-select:focus, .owner-textarea:focus {
  border-color: var(--color-primary, #0f172a);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

/* Enterprise Custom Select Component */
.enterprise-select {
  position: relative;
  width: 100%;
  text-align: left;
}

.enterprise-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
  outline: none;
  text-align: left;
}

.enterprise-select-trigger:hover {
  border-color: #94a3b8;
  background: #fdfefe;
}

.enterprise-select-trigger:focus,
.enterprise-select.is-open .enterprise-select-trigger {
  border-color: var(--color-primary, #0f172a);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.enterprise-select.has-error .enterprise-select-trigger {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.enterprise-select-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.enterprise-select-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.enterprise-select-trigger.has-value .enterprise-select-icon-wrap {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
}

.enterprise-select-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.enterprise-select-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enterprise-select-placeholder {
  color: #64748b;
  font-weight: 500;
}

.enterprise-select-sub {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.enterprise-select-chevron {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.enterprise-select.is-open .enterprise-select-chevron {
  transform: rotate(180deg);
  color: #0f172a;
}

.enterprise-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem;
  box-sizing: border-box;
}

.enterprise-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.enterprise-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.enterprise-select-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.enterprise-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.enterprise-select-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.enterprise-select-option:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
}

.enterprise-select-option.is-selected {
  background: #fff7ed;
  border-color: #fed7aa;
}

.enterprise-opt-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.enterprise-select-option:hover .enterprise-opt-icon {
  background: #e2e8f0;
  color: #0f172a;
}

.enterprise-select-option.is-selected .enterprise-opt-icon {
  background: #ffedd5;
  color: #ea580c;
}

.enterprise-opt-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.enterprise-opt-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.enterprise-select-option.is-selected .enterprise-opt-title {
  color: #c2410c;
}

.enterprise-opt-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.25;
  margin-top: 2px;
}

.enterprise-opt-check {
  display: none;
  color: #ea580c;
  flex-shrink: 0;
}

.enterprise-select-option.is-selected .enterprise-opt-check {
  display: flex;
  align-items: center;
}

/* Items Grid & Cards */
.owner-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.owner-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.owner-items-grid {
  display: flex;
  flex-direction: column;
}

.owner-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  gap: 1.25rem;
  background: #ffffff;
  transition: background-color 0.15s ease;
}

.owner-item-row:last-child {
  border-bottom: none;
}

.owner-item-row:hover {
  background: #fafbfc;
}

.owner-item-row.is-selected {
  background: #f5f7fa;
  border-color: #cbd5e1;
}

.owner-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.owner-bulk-bar.has-selection {
  position: sticky;
  top: 72px;
  z-index: 25;
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.08);
}

.owner-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
}

.owner-bulk-checkbox,
.owner-item-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}

.owner-item-checkbox {
  margin-top: 0;
}

.owner-bulk-count {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 700;
}

.owner-bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

/* =========================================================
   POLARIS INDEX TABLE FOR MENU ITEMS
   ========================================================= */
.owner-polaris-page-header {
  align-items: center;
  margin-bottom: 1rem;
}

.owner-polaris-heading-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.owner-polaris-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #1e293b;
  flex-shrink: 0;
}

.owner-polaris-page-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.owner-polaris-toolbar-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 34px;
}

.owner-polaris-toolbar-btn:hover {
  background: #f8fafc;
  border-color: #9ca3af;
}

.owner-polaris-primary-btn {
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #1a1a1a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.95rem;
  border-radius: 8px;
  height: 34px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}

.owner-polaris-primary-btn:hover {
  background: #303030;
  border-color: #303030;
}

.owner-items-overflow-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.owner-items-overflow-dots {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.owner-items-overflow-dots:hover,
.owner-items-overflow-dots[aria-expanded="true"] {
  background: #f1f5f9;
  border-color: #9ca3af;
  color: #0f172a;
}

.owner-items-overflow-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.owner-items-menu-icon {
  display: none;
  flex-shrink: 0;
}

.owner-polaris-index-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.owner-polaris-index-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.owner-polaris-status-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.owner-polaris-tab-pill {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 0.36rem 0.72rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.owner-polaris-tab-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.owner-polaris-tab-pill.is-active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.owner-polaris-filter-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 380px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.owner-polaris-search-box {
  position: relative;
  flex: 1 1 200px;
  max-width: 280px;
}

.owner-polaris-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.owner-polaris-search-input {
  width: 100%;
  height: 32px;
  padding: 0.3rem 0.65rem 0.3rem 2rem;
  font-size: 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
}

.owner-polaris-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #64748b;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.14);
}

.owner-polaris-compact-select {
  height: 32px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.owner-polaris-count-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  padding: 0 0.25rem;
}

.owner-polaris-bulk-bar {
  margin: 0;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 0.46rem 0.95rem;
  min-height: 40px;
  background: #f8fafc;
  box-shadow: none;
}

.owner-polaris-bulk-bar.has-selection {
  position: static;
  top: auto;
  z-index: auto;
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
}

.owner-polaris-bulk-bar.has-selection + .owner-polaris-table-wrap .owner-polaris-table thead {
  display: none;
}

.owner-polaris-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.owner-polaris-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.owner-polaris-table thead th {
  padding: 0.6rem 0.75rem;
  font-size: 0.73rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

.owner-polaris-table thead th.col-check,
.owner-polaris-table tbody td.col-check {
  width: 40px;
  padding-left: 0.95rem;
  padding-right: 0.35rem;
}

.owner-polaris-table thead th.col-actions,
.owner-polaris-table tbody td.col-actions {
  text-align: right;
  padding-right: 0.95rem;
}

.owner-polaris-row {
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: background-color 0.12s ease;
}

.owner-polaris-row:last-child {
  border-bottom: none;
}

.owner-polaris-row:hover {
  background: #f8fafc;
}

.owner-polaris-row.is-selected {
  background: #f5f7fa;
}

.owner-polaris-row.is-selected:hover {
  background: #eef2f6;
}

.owner-polaris-row td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  color: #1e293b;
}

.owner-polaris-item-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 200px;
}

.owner-polaris-thumb {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.owner-polaris-item-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.owner-polaris-item-link {
  display: inline-block;
  text-decoration: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.3;
}

.owner-polaris-item-link:hover {
  text-decoration: underline;
  color: #059669;
}

.owner-polaris-item-sub {
  font-size: 0.72rem;
  color: #64748b;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-polaris-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.owner-polaris-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.owner-polaris-status-pill.is-active {
  background: #dcfce7;
  color: #166534;
}

.owner-polaris-status-pill.is-soldout {
  background: #fee2e2;
  color: #b91c1c;
}

.owner-polaris-table thead th.col-pos,
.owner-polaris-table tbody td.col-pos {
  width: 48px;
  padding-left: 0.95rem;
  padding-right: 0.25rem;
}

.owner-polaris-pos-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Arrange Menu Order Modal */
.owner-reorder-modal-card {
  max-width: 520px;
  width: 94%;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.owner-reorder-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
  background: #f8fafc;
}

.owner-reorder-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.owner-reorder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.owner-reorder-item.is-moved {
  border-color: #10b981;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.14);
}

.owner-reorder-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.owner-reorder-pos-select {
  height: 32px;
  min-width: 56px;
  padding: 0 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.owner-reorder-pos-select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.owner-reorder-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.owner-reorder-item-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-reorder-item-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.owner-reorder-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.owner-reorder-step-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.owner-reorder-step-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.owner-reorder-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.owner-reorder-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.owner-reorder-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.owner-polaris-cat-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  color: #c2410c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.owner-polaris-cat-count-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.owner-polaris-cat-count-btn:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.owner-polaris-cat-count-btn.is-static {
  cursor: default;
}

.owner-polaris-cat-count-btn.is-static:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.owner-switch-mini {
  transform: scale(0.78);
  transform-origin: left center;
}

.owner-polaris-price {
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.owner-polaris-compare-price {
  margin-left: 0.35rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: line-through;
}

.owner-polaris-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.owner-polaris-icon-action {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.24rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.owner-polaris-icon-action:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.owner-polaris-icon-action.is-danger:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

@media (max-width: 1120px) {
  #tab-pane-items .owner-polaris-index-topbar,
  #tab-pane-categories .owner-polaris-index-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  #tab-pane-items .owner-polaris-filter-controls,
  #tab-pane-categories .owner-polaris-filter-controls {
    flex: 1 1 auto;
    justify-content: flex-start;
    width: 100%;
  }
  #tab-pane-items .owner-polaris-search-box,
  #tab-pane-categories .owner-polaris-search-box {
    max-width: none;
    flex: 1 1 200px;
    min-width: 0;
  }
  #tab-pane-items .owner-polaris-table thead th,
  #tab-pane-items .owner-polaris-row td,
  #tab-pane-categories .owner-polaris-table thead th,
  #tab-pane-categories .owner-polaris-row td {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
  #tab-pane-items .owner-polaris-table thead th.col-check,
  #tab-pane-items .owner-polaris-table tbody td.col-check,
  #tab-pane-categories .owner-polaris-table thead th.col-check,
  #tab-pane-categories .owner-polaris-table tbody td.col-check {
    padding-left: 0.75rem;
    padding-right: 0.25rem;
  }
  #tab-pane-items .owner-polaris-item-cell,
  #tab-pane-categories .owner-polaris-item-cell {
    min-width: 150px;
  }
  #tab-pane-items .owner-polaris-item-sub {
    max-width: clamp(140px, 20vw, 230px);
  }
}

@media (max-width: 768px) {
  .owner-polaris-filter-controls {
    justify-content: flex-start;
  }
  .owner-polaris-search-box {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .owner-polaris-table thead {
    display: none;
  }
  .owner-polaris-table tbody,
  .owner-polaris-table tr.owner-polaris-row {
    display: block;
  }

  /* Responsive Grid Cards for Menu Items & Categories (Mobile & Portrait Tablet) */
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.65rem;
    row-gap: 0.42rem;
    align-items: center;
    padding: 0.85rem 0.85rem 0.85rem 2.55rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row {
    grid-template-areas:
      "item price"
      "status actions"
      "dietary actions";
  }
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row {
    grid-template-areas:
      "item count"
      "pos actions";
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row:has(td.col-check:empty),
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-cat-row.has-no-check {
    padding-left: 0.85rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row td {
    display: block;
    padding: 0;
    min-width: 0;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td.col-check,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row td.col-check {
    position: absolute;
    left: 0.8rem;
    top: 0.98rem;
    width: auto;
    padding: 0;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td.col-item,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row td.col-item {
    grid-area: item;
    padding-bottom: 0.12rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row .owner-polaris-item-cell,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row .owner-polaris-item-cell {
    min-width: 0;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row .owner-polaris-item-link,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row .owner-polaris-item-link {
    word-break: break-word;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row .owner-polaris-item-sub {
    max-width: 100%;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td:nth-child(4) {
    grid-area: price;
    text-align: right;
    align-self: start;
    padding-top: 0.08rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td:nth-child(3) {
    grid-area: status;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td:nth-child(5) {
    grid-area: dietary;
  }
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-cat-row td.col-pos {
    grid-area: pos;
    display: inline-flex;
    width: auto;
    padding: 0;
  }
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-cat-row td.col-count {
    grid-area: count;
    text-align: right;
    justify-self: end;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td.col-actions,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row td.col-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    align-self: end;
    justify-self: end;
    margin: 0;
    padding: 0;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row .owner-polaris-icon-action,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row .owner-polaris-icon-action {
    min-height: 32px;
    padding: 0.28rem 0.8rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  #tab-pane-categories .owner-polaris-page-actions {
    width: 100%;
    gap: 0.5rem;
  }
  #tab-pane-categories .owner-polaris-page-actions .owner-btn {
    width: auto !important;
    flex: 1 1 0;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    justify-content: center;
    white-space: nowrap;
  }
  #tab-pane-items .owner-polaris-index-topbar,
  #tab-pane-categories .owner-polaris-index-topbar {
    padding: 0.65rem 0.75rem;
    gap: 0.6rem;
  }
  #tab-pane-items .owner-polaris-status-tabs,
  #tab-pane-categories .owner-polaris-status-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  #tab-pane-items .owner-polaris-status-tabs::-webkit-scrollbar,
  #tab-pane-categories .owner-polaris-status-tabs::-webkit-scrollbar {
    display: none;
  }
  #tab-pane-items .owner-polaris-tab-pill,
  #tab-pane-categories .owner-polaris-tab-pill {
    white-space: nowrap;
    flex-shrink: 0;
  }
  #tab-pane-items .owner-polaris-filter-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  #tab-pane-categories .owner-polaris-filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }
  #tab-pane-items .owner-polaris-search-box,
  #tab-pane-categories .owner-polaris-search-box {
    grid-column: 1 / -1;
  }
  #tab-pane-items .owner-polaris-search-input,
  #tab-pane-categories .owner-polaris-search-input {
    height: 36px;
    font-size: 0.84rem;
  }
  #tab-pane-items .owner-polaris-compact-select,
  #tab-pane-categories .owner-polaris-compact-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    font-size: 0.8rem;
  }
  #tab-pane-items .owner-polaris-count-chip {
    grid-column: 1 / -1;
    justify-self: end;
    padding: 0.05rem 0;
  }
  #tab-pane-categories .owner-polaris-count-chip {
    padding: 0 0.2rem;
    justify-self: end;
  }
  #tab-pane-items .owner-polaris-bulk-bar,
  #tab-pane-categories .owner-polaris-bulk-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
  }
  #tab-pane-items .owner-polaris-bulk-bar .owner-bulk-actions,
  #tab-pane-categories .owner-polaris-bulk-bar .owner-bulk-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
  }
  #tab-pane-items .owner-polaris-bulk-bar .owner-bulk-actions .owner-btn,
  #tab-pane-categories .owner-polaris-bulk-bar .owner-bulk-actions .owner-btn {
    width: 100%;
    min-height: 32px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .owner-reorder-modal-card {
    width: 96%;
    max-height: 90vh;
  }
  .owner-reorder-modal-body {
    padding: 0.75rem 0.85rem;
  }
  .owner-reorder-item {
    padding: 0.55rem 0.65rem;
    gap: 0.5rem;
  }
  .owner-reorder-modal-footer {
    padding: 0.75rem 0.85rem;
    flex-wrap: wrap;
  }
  .owner-reorder-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 420px) {
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row {
    padding: 0.75rem 0.7rem 0.75rem 2.25rem;
    column-gap: 0.45rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row:has(td.col-check:empty),
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-cat-row.has-no-check {
    padding-left: 0.7rem;
  }
  #tab-pane-items .owner-polaris-table tr.owner-polaris-row td.col-check,
  #tab-pane-categories .owner-polaris-table tr.owner-polaris-row td.col-check {
    left: 0.65rem;
    top: 0.88rem;
  }
  #tab-pane-items .owner-polaris-thumb,
  #tab-pane-categories .owner-polaris-cat-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  #tab-pane-items .owner-polaris-price {
    font-size: 0.8rem;
  }
}

.owner-item-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1 1 380px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.owner-item-thumb {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.owner-item-details {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.owner-item-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.owner-item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.owner-item-cat-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.owner-item-category-tag {
  display: inline-block;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 0.3rem;
  color: #475569;
  border: 1px solid #e2e8f0;
  line-height: 1.3;
  white-space: nowrap;
}

.owner-item-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.35rem 0 0 0;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
}

.owner-item-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex: 1 1 340px;
  max-width: 100%;
  box-sizing: border-box;
}

.owner-item-pricing-toggle {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.owner-item-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.owner-item-compare-price {
  font-size: 0.75em;
  text-decoration: line-through;
  color: #94a3b8;
  margin-left: 4px;
  font-weight: normal;
}

.owner-item-switch-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.owner-item-actions-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.owner-item-action-btn {
  white-space: nowrap;
}

/* Category List */
.owner-category-list {
  display: flex;
  flex-direction: column;
}

.owner-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  transition: background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  user-select: none;
  gap: 0.75rem;
}

.owner-cat-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 200px;
  min-width: 0;
}

.owner-cat-info {
  min-width: 0;
  overflow: hidden;
}

.owner-cat-name {
  margin: 0;
  font-size: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.owner-cat-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.owner-cat-actions .owner-btn {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.owner-category-row:hover {
  background: #f8fafc;
}

/* Table Search & Filter Bar */
.owner-qr-filter-bar {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.owner-qr-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
  min-width: 200px;
}

.owner-qr-search-input {
  padding-left: 2.25rem !important;
  font-size: 0.88rem;
  width: 100%;
  border-radius: 8px;
  min-height: 40px;
  box-sizing: border-box;
}

.owner-qr-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.owner-qr-count-indicator {
  font-size: 0.84rem;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

/* Tables Grid & QR Cards */
.owner-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 0.25rem 0 1.5rem 0;
}

.owner-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border-radius: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Table Card */
.owner-qr-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  position: relative;
}

.owner-qr-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
}

/* Card Top: Identity & Trash */
.owner-tbl-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.owner-tbl-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.owner-tbl-icon-pill {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  flex-shrink: 0;
}

.owner-tbl-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.owner-tbl-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-tbl-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
  margin-top: 0.15rem;
}

.owner-tbl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.owner-tbl-delete-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.owner-tbl-delete-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fee2e2;
}

/* Table Card 3-Dot Actions Menu */
.owner-tbl-menu-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.owner-tbl-menu-trigger {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.owner-tbl-menu-trigger:hover,
.owner-tbl-menu-trigger.active {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.owner-tbl-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 165px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 0.35rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.owner-tbl-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.owner-tbl-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.owner-tbl-dropdown-item.owner-tbl-dropdown-danger {
  color: #dc2626;
}

.owner-tbl-dropdown-item.owner-tbl-dropdown-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.owner-tbl-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0.25rem 0;
}

/* QR Preview Stage */
.owner-tbl-qr-stage {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
}

.owner-tbl-qr-stage:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.owner-tbl-qr-canvas {
  background: #ffffff;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: transform 0.2s ease;
}

.owner-tbl-qr-canvas svg {
  display: block;
  width: 110px;
  height: 110px;
}

.owner-tbl-qr-stage:hover .owner-tbl-qr-canvas {
  transform: scale(1.03);
}

.owner-tbl-qr-hover-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  transition: color 0.15s ease;
}

.owner-tbl-qr-stage:hover .owner-tbl-qr-hover-hint {
  color: #0f172a;
}

.owner-tbl-no-qr {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}

/* Meta Bar */
.owner-tbl-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

.owner-tbl-meta-label {
  font-weight: 500;
  color: #94a3b8;
}

.owner-tbl-meta-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* Actions Stack */
.owner-tbl-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.85rem;
}

.owner-tbl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 40px;
  box-sizing: border-box;
}

.owner-tbl-btn svg,
.owner-tbl-btn .portal-icon {
  width: 15px !important;
  height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.owner-tbl-icon-pill svg,
.owner-tbl-icon-pill .portal-icon {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.owner-tbl-delete-btn svg,
.owner-tbl-delete-btn .portal-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.owner-tbl-qr-hover-hint svg,
.owner-tbl-qr-hover-hint .portal-icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.owner-tbl-btn-print {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

.owner-tbl-btn-print:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.owner-tbl-btn-copy {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.owner-tbl-btn-copy:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Empty State */
.owner-qr-empty {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.owner-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.owner-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.owner-empty-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  max-width: 380px;
  margin: 0 auto;
}

/* Switch */
.owner-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.owner-switch input { opacity: 0; width: 0; height: 0; }
.owner-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 24px;
}
.owner-slider:before {
  position: absolute; content: "";
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .owner-slider { background-color: #10b981; }
input:checked + .owner-slider:before { transform: translateX(20px); }

/* Buttons */
.owner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  width: auto;
  box-sizing: border-box;
}
.owner-btn-primary { background: var(--color-primary, #0f172a); color: #fff; }
.owner-btn-primary:hover { opacity: 0.9; }
.owner-btn-secondary { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.owner-btn-secondary:hover { background: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
.owner-btn-outline { background: transparent; border-color: #cbd5e1; color: #334155; }
.owner-btn-outline:hover { background: #f1f5f9; }
.owner-btn-danger { background: transparent; color: #ef4444; border-color: #fecaca; }
.owner-btn-danger:hover { background: #fee2e2; }
.owner-btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; border-radius: 6px; }
.owner-btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; border-radius: 4px; }
.owner-btn.is-perm-disabled,
.owner-polaris-toolbar-btn.is-perm-disabled,
.owner-btn-clear-logs.is-perm-disabled,
.owner-btn:disabled,
.owner-polaris-toolbar-btn:disabled,
.owner-btn-clear-logs:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}
.owner-btn.is-perm-disabled:hover,
.owner-polaris-toolbar-btn.is-perm-disabled:hover,
.owner-btn-clear-logs.is-perm-disabled:hover,
.owner-btn:disabled:hover,
.owner-polaris-toolbar-btn:disabled:hover,
.owner-btn-clear-logs:disabled:hover {
  opacity: 0.45 !important;
}

/* Modals */
html.owner-modal-open,
body.owner-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body.owner-modal-open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

.owner-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overscroll-behavior: contain;
}

.owner-modal-card {
  background: #ffffff;
  border-radius: 1rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  box-sizing: border-box;
}

.owner-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.owner-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
}

.owner-form { display: flex; flex-direction: column; gap: 1rem; }
.owner-form-row { display: flex; gap: 1rem; }
.owner-form-row > * { flex: 1; }
.owner-form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.owner-label { font-size: 0.85rem; font-weight: 700; color: #334155; }
.owner-checkbox-row { flex-direction: row; align-items: center; gap: 0.75rem; }
.owner-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

/* Tent Card Print Layout */
.owner-tent-card {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.tent-restaurant { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin-bottom: 0.25rem; }
.tent-tag { font-size: 0.8rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.tent-qr-box { margin: 1.5rem 0; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.tent-qr-title { font-size: 2rem; font-weight: 900; color: var(--color-primary, #0f172a); }
.tent-instructions { font-size: 0.85rem; color: #64748b; }

@media print {
  @page {
    size: auto;
    margin: 10mm;
  }
  html, body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  body * {
    visibility: hidden;
  }
  .owner-modal-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .owner-modal-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: transparent !important;
  }
  .owner-modal-header,
  .owner-modal-footer {
    display: none !important;
  }
  #printable-tent-card, #printable-tent-card * {
    visibility: visible;
  }
  #printable-tent-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 2rem auto !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 1rem !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

