/* =====================================================
   Siliscia POS – Design System
   Hub Tech — dark slate + sky/indigo (all hosts)
   ===================================================== */

:root {
  --bg: #070B14;
  --bg-soft: #0F172A;
  --bg-elevated: #111827;
  --bg-card: #1E293B;
  --accent: #0EA5E9;
  --accent-soft: rgba(14, 165, 233, 0.16);
  --accent-dark: #0284C7;
  --accent-2: #0284C7;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.22);
  --tech-line: #38BDF8;
  --success: #34D399;
  --danger: #F87171;
  --warning: #FBBF24;
  --info: #38BDF8;
  --radius: 1rem;
  --radius-sm: 0.75rem;
  --shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 18px 40px -16px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px 520px at 8% -12%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(99, 102, 241, 0.14), transparent 50%);
  background-attachment: fixed;
}

.logo-font {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  user-select: none;
  will-change: transform;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  color: white;
  box-shadow: 0 10px 24px -10px rgba(14, 165, 233, 0.55);
}
.btn-primary:hover {
  filter: brightness(1.06);
  background: linear-gradient(135deg, #38BDF8 0%, #38BDF8 100%);
}

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--accent);
  color: #E0F2FE;
}

.btn-success {
  background: var(--success);
  color: #052e1c;
}

.btn-danger {
  background: var(--danger);
  color: #450a0a;
}

.btn-lg {
  padding: 18px 32px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: rgba(30, 41, 59, 0.88);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(10px);
}

/* ---------- Form elements ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: rgba(2, 6, 23, 0.65);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
/* Native <select> popup is a light OS menu — option text must be dark */
select.form-input,
#checkout-modal select,
#payment-lines select {
  color: #F1F5F9;
  background-color: #0B1220;
}
select.form-input option,
#checkout-modal select option,
#payment-lines select option {
  color: #0B1220 !important;
  background-color: #ffffff !important;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-new { background: #E3F2FD; color: #1565C0; }
.badge-preparing { background: #FFF8E1; color: #F57F17; }
.badge-ready { background: #E8F5E9; color: #2E7D32; }
.badge-completed { background: #F5F5F5; color: #616161; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }

/* ---------- Tablet optimizations ---------- */
@media (min-width: 768px) {
  .btn {
    min-height: 48px; /* better touch target */
  }
}

/* Touch-friendly product cards */
.product-tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.product-tile:active {
  transform: scale(0.97);
}

/* Prevent text selection on interactive elements */
.no-select {
  user-select: none;
  -webkit-user-select: none;
}


/* Stock count flag states on POS header button */
#stock-count-btn.stock-count-flag-1,
button#stock-count-btn.stock-count-flag-1.btn-outline {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}
#stock-count-btn.stock-count-flag-2,
button#stock-count-btn.stock-count-flag-2.btn-outline {
  background: #fecaca !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}
#stock-count-btn.stock-count-flag-3,
button#stock-count-btn.stock-count-flag-3.btn-outline {
  background: #f87171 !important;
  border-color: #dc2626 !important;
  color: #7f1d1d !important;
  font-weight: 600 !important;
}

#pos-transfers-btn.pos-transfers-recount {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

#pos-transfers-recount-flag {
  color: #f59e0b !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
#pos-transfers-btn.pos-transfers-recount {
  background-color: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

/* =====================================================
   Mobile-first responsive patterns
   ===================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Touch targets */
@media (max-width: 767px) {
  .btn {
    min-height: 44px;
    padding: 12px 18px;
    font-size: 14px;
  }
  .btn-outline,
  .btn-primary,
  .btn-success,
  .btn-accent {
    touch-action: manipulation;
  }
  .form-input,
  select.form-input,
  textarea.form-input {
    min-height: 44px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
}

/* Tables: horizontal scroll on small screens */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive table {
  min-width: 560px;
}

/* Sticky mobile action bar helper */
.mobile-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

/* Compact product grid on phones */
@media (max-width: 639px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 10px !important;
  }
  .product-tile .p-3 {
    padding: 0.5rem !important;
  }
}

/*
 * POS tools panel — mobile: ONE scroll container (the panel itself).
 * Nested flex + height:auto prevented iOS from scrolling and clipped the list.
 */
@media (max-width: 767px) {
  #pos-tools-panel {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: 88vh !important;
    max-height: 88dvh !important;
    height: auto !important;
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    z-index: 80 !important;
  }
  #pos-tools-panel.hidden {
    display: none !important;
  }
  #pos-tools-panel > div:first-child {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #0f172a !important;
  }
  #pos-tools-scroll {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: none !important;
    padding: 0.5rem 0.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #pos-tools-panel .btn {
    min-height: 3rem !important;
    width: 100% !important;
    margin-bottom: 0.35rem !important;
  }
}

/* Admin layout: collapsible modules drawer */
.admin-shell {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.admin-aside {
  width: 18rem;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 1.25rem;
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.admin-sub-menu {
  width: 16rem;
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1rem;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .admin-aside {
    position: fixed;
    top: 4rem;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
    width: min(20rem, 88vw);
  }
  .admin-aside.open {
    transform: translateX(0);
  }
  .admin-aside-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 4rem;
    background: rgba(0, 0, 0, 0.35);
    z-index: 40;
  }
  .admin-aside-backdrop.open {
    display: block;
  }
  .admin-sub-menu {
    width: 100%;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-main-split {
    flex-direction: column !important;
  }
  #content-area {
    padding: 1rem !important;
  }
  .admin-header-actions .btn span.hide-sm {
    display: none;
  }
}

@media (max-width: 639px) {
  header.h-16 {
    height: 3.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  #content-area {
    padding: 0.75rem !important;
  }
  .card {
    border-radius: 1rem;
  }
  /* Stack page headers */
  .page-header-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
  }
}

/* Modal: full-screen sheet on phones */
@media (max-width: 639px) {
  .modal-sheet,
  [id$="-modal"] > div.bg-white {
    max-height: 92dvh;
    border-radius: 1.25rem 1.25rem 0 0;
  }
}

/* Filter rows wrap */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
}
.filters-row .form-input,
.filters-row select {
  min-width: 0;
  flex: 1 1 140px;
}

/* Hide scrollbar visually but keep scroll */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Landscape phone: tighter cart */
@media (max-width: 900px) and (orientation: landscape) {
  .cart-panel.open {
    max-height: 70vh;
  }
}


/* Responsive data tables → cards on small screens */
@media (max-width: 767px) {
  .responsive-data-table thead {
    display: none !important;
  }
  .responsive-data-table tbody tr {
    display: block;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    box-shadow: var(--shadow);
  }
  /* Override Tailwind hidden / sm:table-cell so every field shows in cards */
  .responsive-data-table tbody td,
  .responsive-data-table tbody td.hidden,
  .responsive-data-table tbody td[class*="sm:table-cell"],
  .responsive-data-table tbody td[class*="md:table-cell"],
  .responsive-data-table tbody td[class*="lg:table-cell"] {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border: none;
    text-align: right;
    font-size: 0.875rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .responsive-data-table tbody td::before {
    content: attr(data-label);
    font-weight: 500;
    color: #9ca3af;
    text-align: left;
    flex: 0 0 5.5rem;
    max-width: 5.5rem;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    padding-top: 0.15rem;
  }
  .responsive-data-table tbody td > * {
    min-width: 0;
    max-width: calc(100% - 6rem);
    text-align: right;
  }
  /* Product cell: label on top, image + name full width below */
  .responsive-data-table tbody td[data-label="Product"] {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #F0EEF2;
    margin-bottom: 0.15rem;
  }
  .responsive-data-table tbody td[data-label="Product"]::before {
    flex: none;
    max-width: none;
  }
  .responsive-data-table tbody td[data-label="Product"] > * {
    max-width: 100%;
    text-align: left;
  }
  .responsive-data-table tbody td[data-label="Product"] .prod-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }
  .responsive-data-table tbody td[data-label="Product"] .prod-card-main img {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    object-fit: cover;
  }
  .responsive-data-table tbody td[data-label="Product"] .prod-card-text {
    min-width: 0;
    flex: 1;
  }
  .responsive-data-table tbody td[data-label="Product"] .prod-card-text .font-medium {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }
  .responsive-data-table tbody td.td-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 0.65rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
    gap: 0.4rem;
  }
  .responsive-data-table tbody td.td-actions::before {
    display: none !important;
  }
  .responsive-data-table tbody td.td-actions > * {
    max-width: 100%;
  }
}


/* ========== Stable modal window sizes (responsive) ==========
   Desktop: fixed footprint so tabs/tables don't resize the frame.
   Mobile: bottom-sheet, dvh, safe-area — height flexible within a max. */

.modal-shell-lg,
.modal-shell,
.modal-shell-sm {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08), 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  /* prevent iOS rubber-band from scrolling the page behind */
  overscroll-behavior: contain;
}

.modal-shell-header,
.modal-shell-toolbar,
.modal-shell-tabs,
.modal-shell-footer {
  flex-shrink: 0;
}

.modal-shell-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-shell-body .modal-empty {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Mobile: fixed footprint bottom sheets (no resize when tabs/content change) ----- */
.modal-shell-lg,
.modal-shell,
.modal-shell-sm {
  max-width: 100%;
  border-radius: 1.25rem 1.25rem 0 0;
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* fixed height — body scrolls inside */
  height: min(92dvh, 100%);
  max-height: min(92dvh, 100%);
}

.modal-shell-lg {
  height: min(92dvh, 100%);
  max-height: min(92dvh, 100%);
}

.modal-shell {
  height: min(90dvh, 100%);
  max-height: min(90dvh, 100%);
}

.modal-shell-sm {
  height: min(82dvh, 100%);
  max-height: min(82dvh, 100%);
}

/* Overlay: bottom-align sheets on small screens (padding handled per breakpoint below) */

/* Landscape phone: leave room for browser chrome */
@media (max-width: 900px) and (orientation: landscape) {
  .modal-shell-lg,
  .modal-shell,
  .modal-shell-sm {
    max-height: min(88dvh, 100%);
  }
  .modal-shell-lg {
    height: min(88dvh, 100%);
  }
}

/* ----- Tablet / desktop: stable fixed footprint ----- */
@media (min-width: 768px) {
  .modal-shell-lg,
  .modal-shell,
  .modal-shell-sm {
    border-radius: 1.5rem;
    margin: auto;
    padding-bottom: 0;
  }

  .modal-shell-lg {
    max-width: 72rem;
    height: min(90vh, 920px);
    max-height: 90vh;
  }

  .modal-shell {
    max-width: 42rem;
    height: min(88vh, 800px);
    max-height: 88vh;
  }

  .modal-shell-sm {
    max-width: 28rem;
    /* fixed footprint — content scrolls inside, window does not resize */
    height: min(72vh, 520px);
    max-height: min(80vh, 560px);
  }

  /* When md:items-center is used, center the shell */
  .fixed.inset-0.flex.md\:items-center {
    padding: 1rem;
  }
}

/* Wide desktop: slightly taller large shell */
@media (min-width: 1280px) {
  .modal-shell-lg {
    height: min(90vh, 960px);
  }
}

/* Admin main workspace */
@media (min-width: 768px) {
  #content-area {
    min-height: calc(100vh - 8rem);
  }
}

/* Kill conflicting inline height on shells when on mobile */
@media (max-width: 767px) {
  .modal-shell-lg[style],
  .modal-shell[style],
  .modal-shell-sm[style] {
    height: auto !important;
    max-height: min(92dvh, 100%) !important;
  }
  .modal-shell-lg[style] {
    height: min(92dvh, 100%) !important;
  }
}


/* ========== My Zone mobile layout ========== */
#myzone-modal {
  z-index: 50;
}
#myzone-modal .modal-shell-lg {
  width: 100%;
}

/* KPI grid tighter on small screens */
#myzone-kpis {
  gap: 0.5rem;
}
#myzone-kpis .card {
  padding: 0.5rem 0.65rem;
}
#myzone-kpis .card .text-lg {
  font-size: 0.95rem;
  line-height: 1.25;
}
#myzone-kpis .card .text-base {
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  #myzone-modal {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }
  #myzone-modal .modal-shell-lg {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex !important;
    flex-direction: column !important;
  }
  /* Keep chrome compact */
  #myzone-modal .modal-shell-header {
    padding: 0.65rem 0.75rem !important;
  }
  #myzone-modal .modal-shell-header h3 {
    font-size: 1rem;
  }
  #myzone-modal .modal-shell-toolbar {
    padding: 0.5rem 0.75rem !important;
  }
  #myzone-modal .modal-shell-toolbar .form-input,
  #myzone-modal .modal-shell-toolbar select {
    font-size: 0.8125rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
  /* KPI: single horizontal scroll row on narrow phones */
  #myzone-kpis {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    -webkit-overflow-scrolling: touch;
  }
  #myzone-kpis .card {
    flex: 0 0 auto;
    min-width: 7.5rem;
    max-width: 10rem;
    padding: 0.45rem 0.55rem !important;
  }
  #myzone-kpis .card .text-lg,
  #myzone-kpis .card .text-base {
    font-size: 0.9rem !important;
  }
  #myzone-kpis .card .text-\[10px\],
  #myzone-kpis .card .text-xs,
  #myzone-kpis .card [class*="uppercase"] {
    font-size: 0.6rem !important;
  }
  #myzone-tabs {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  #myzone-tabs .myzone-tab {
    font-size: 0.7rem;
    padding: 0.45rem 0.55rem;
    white-space: nowrap;
  }
  /* Body MUST take remaining space and scroll */
  #myzone-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.5rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #myzone-body .card {
    border-radius: 0.75rem;
  }
  #myzone-body table {
    min-width: 560px;
    font-size: 0.75rem;
  }
  #myzone-body table th,
  #myzone-body table td {
    padding: 0.4rem 0.5rem !important;
  }
  #myzone-modal .modal-shell-footer {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.6rem;
  }
  #myzone-modal .modal-shell-footer span {
    flex: 1 1 100%;
    order: 2;
    line-height: 1.3;
  }
  #myzone-modal .modal-shell-footer .btn {
    order: 1;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
  }
}

/* Do not force padding:0 on every items-end overlay — breaks md padding */
.fixed.inset-0.flex.items-end.md\:items-center {
  /* mobile: bottom sheet alignment comes from items-end */
}
@media (max-width: 767px) {
  .fixed.inset-0.flex.items-end {
    padding: 0;
  }
}
@media (min-width: 768px) {
  .fixed.inset-0.flex.items-end.md\:items-center {
    padding: 1rem;
    align-items: center;
  }
}


/* Floating back-to-top (all scrollable lists) */
#siliscia-back-to-top {
  position: fixed;
  left: 1rem;
  right: auto;
  bottom: 1.25rem;
  z-index: 40; /* below modals (280+) and tools sheet (70+) */
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1A1A1F;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}
#siliscia-back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#siliscia-back-to-top:hover {
  background: #6E6A75;
}
#siliscia-back-to-top:focus {
  outline: 2px solid #D4A5A5;
  outline-offset: 2px;
}
@media (max-width: 767px) {
  #siliscia-back-to-top {
    left: 0.75rem;
    right: auto;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    width: 2.5rem;
    height: 2.5rem;
  }
}


/* Keep money / KPI values inside cards on all devices */
.kpi-money,
.stat-value,
#acc-pay-summary .card > div:last-child,
#acc-pay-summary .card .text-xl,
#myzone-kpis .card .text-lg,
#myzone-kpis .card .text-base,
#content-area .card .text-xl.font-semibold,
#content-area .card .text-2xl.font-semibold {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  max-width: 100%;
  font-size: clamp(0.8rem, 2.8vw, 1.15rem);
}
#content-area .card,
#acc-pay-summary .card,
#myzone-kpis .card {
  overflow: hidden;
  min-width: 0;
}
#acc-pay-summary,
#myzone-kpis {
  min-width: 0;
}


/* Credentials dialog — fixed footprint on all devices */
.ui-cred-shell {
  min-height: 0;
}
@media (max-width: 639px) {
  .ui-cred-shell {
    max-height: min(92dvh, 100%);
  }
}


/* CRM search — reserved results area (no modal resize while typing) */
#crm-search-modal .modal-shell-sm {
  display: flex;
  flex-direction: column;
}
#crm-search-modal #crm-results {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #E4E2E8;
  border-radius: 1rem;
  background: #F9F8FA;
  padding: 0;
}
#crm-search-modal #crm-results > .crm-results-table {
  margin: 0;
}
@media (max-width: 767px) {
  #crm-search-modal .modal-shell-sm {
    height: min(88dvh, 100%);
    max-height: min(92dvh, 100%);
  }
}


/* Modal scroll + sticky header gap fix (app-wide) */
.modal-shell,
.modal-shell-lg,
.modal-shell-sm {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-shell-body,
.modal-shell > .overflow-y-auto,
.modal-shell-lg > .overflow-y-auto,
.modal-shell-sm > .overflow-y-auto {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prefer fixed column headers outside the scroll area.
   If sticky thead is still used, pin it without leaving a visual gap. */
.modal-shell thead.sticky,
.modal-shell thead [class*="sticky"],
.modal-shell .sticky.top-0,
.modal-shell thead.sticky.top-0 {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: #fff;
  box-shadow: 0 1px 0 #E4E2E8;
}

.modal-shell table {
  border-collapse: separate;
  border-spacing: 0;
}


/* Force fixed window size for all major app modals on mobile */
@media (max-width: 767px) {
  [id$="-modal"]:not([data-ui-overlay]):not(.ui-dialog-overlay) > div.bg-white,
  [id$="-modal"] > div.modal-shell,
  [id$="-modal"] > div.modal-shell-lg,
  [id$="-modal"] > div.modal-shell-sm,
  [data-modal-type]:not([data-ui-overlay]):not(.ui-dialog-overlay) > div.bg-white:not(.ui-dialog-card) {
    height: min(90dvh, 100%) !important;
    max-height: min(90dvh, 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  [id$="-modal"] > div > .overflow-y-auto,
  [id$="-modal"] .loc-tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* Never show scroll-up arrow over open windows */
/* Lock background page scroll when modal stack is open */
html.has-modal-open,
body.has-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  height: 100% !important;
  width: 100% !important;
}
body.has-modal-open {
  position: fixed !important;
  left: 0;
  right: 0;
}
body.has-modal-open #pos-main,
body.has-modal-open #pos-product-scroll,
body.has-modal-open #pos-catalog-scroll {
  overflow: hidden !important;
  touch-action: none !important;
}

body.has-modal-open #siliscia-back-to-top,
body:has([data-modal-type]:not(.hidden)) #siliscia-back-to-top,
body:has(#pos-tools-panel:not(.hidden)) #siliscia-back-to-top,
body:has(#siliscia-modal-back[style*="inline-flex"]) #siliscia-back-to-top {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ========== Sticky table column headers (all devices) ========== */
.table-scroll,
.overflow-x-auto,
.card.overflow-hidden > .overflow-x-auto {
  /* sticky thead needs a scrollport or page scroll */
}

table thead th,
.responsive-data-table thead th,
table thead td {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  color: #F0F9FF !important;
  box-shadow: 0 1px 0 rgba(186, 230, 253, 0.35);
}

/* When table is inside a modal body, stick under modal chrome */
.modal-shell-body thead th,
.modal-shell thead th,
[id$="-modal"] thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  color: #F0F9FF !important;
}

/* Admin content areas */
#admin-content thead th,
.admin-main thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  color: #F0F9FF !important;
}

/* Darker header rows still sticky */
thead.bg-\[\#F7F6F8\] th,
thead[class*="bg-"] th {
  position: sticky;
  top: 0;
}

@media (max-width: 767px) {
  /* Card-layout tables hide thead — no sticky needed */
  .responsive-data-table thead th {
    position: static;
  }
}


/* Sticky table headers — solid bar, no gap under toolbars */
.table-sticky-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.table-sticky-head {
  flex-shrink: 0;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  border-bottom: 1px solid rgba(186, 230, 253, 0.35);
  color: #F0F9FF !important;
  z-index: 8;
}
.table-sticky-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Native sticky th inside a single scrollport */
.overflow-y-auto > table thead th,
.overflow-x-auto > table thead th,
.modal-shell-body > table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  color: #F0F9FF !important;
  box-shadow: 0 1px 0 rgba(186, 230, 253, 0.35);
  background-clip: padding-box;
}

/* Ensure thead itself doesn't create a transparent gap */
.overflow-y-auto > table thead,
.overflow-x-auto > table thead {
  position: sticky;
  top: 0;
  z-index: 8;
  background: linear-gradient(180deg, #0C4A6E 0%, #0369A1 100%) !important;
  color: #F0F9FF !important;
}


/* In-app alert / confirm / prompt */
.ui-dialog-overlay {
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 12px !important;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
@media (min-width: 640px) {
  .ui-dialog-overlay {
    align-items: center !important;
    padding: 1.5rem !important;
  }
}
.ui-dialog-card,
[data-ui-overlay] > .ui-dialog-card {
  height: auto !important;
  max-height: min(88vh, 640px) !important;
  min-height: 0 !important;
  width: min(420px, calc(100vw - 1.5rem)) !important;
  margin: 0 auto !important;
  border-radius: 1.25rem !important;
  flex: none !important;
  display: flex !important;
  flex-direction: column !important;
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 24px 50px rgba(0,0,0,.45);
}
.ui-dialog-head h3 { color: #F8FAFC !important; }
.ui-dialog-x {
  width: 2rem; height: 2rem;
  border: 0; background: transparent;
  color: #94A3B8; font-size: 1.5rem; line-height: 1;
  border-radius: 999px;
}
.ui-dialog-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  max-height: min(52vh, 380px) !important;
  color: #E2E8F0 !important;
}
.ui-dialog-body .text-red-500,
.ui-dialog-body [class*="text-red"] {
  color: #FCA5A5 !important;
}
.ui-dialog-actions {
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  gap: 0.75rem !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #0F172A;
}
.ui-dlg-btn,
.ui-dialog-actions .btn,
.ui-cred-shell .ui-dialog-actions .btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 2.75rem !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  justify-content: center !important;
  border-radius: 0.85rem !important;
}

/* Credentials + staff search */
.ui-cred-shell {
  max-height: min(92dvh, 640px) !important;
  display: flex !important;
  flex-direction: column !important;
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.ui-cred-head { border-bottom: 1px solid rgba(148, 163, 184, 0.22); }
.ui-cred-selected {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #E0F2FE !important;
}
.ui-cred-shell [data-ui-user-list] {
  max-height: min(28vh, 160px) !important;
  flex: 1 1 auto;
  min-height: 0;
}
.ui-cred-shell [data-ui-pass],
.ui-cred-shell [data-ui-err],
.ui-inline-error {
  flex-shrink: 0;
}
.ui-inline-error {
  color: #FCA5A5 !important;
  font-size: 0.75rem;
  line-height: 1.35;
  max-height: 4.2rem;
  overflow-y: auto;
  margin: 0.5rem 0 0;
}
/* dialog buttons sized in .ui-dlg-btn rules above */

/* Readable dropdown panels across the app */
.ui-dropdown-panel,
[data-ui-user-list],
#crm-results,
#crm-search-modal #crm-results {
  background: #0B1220 !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}
.ui-dropdown-item {
  color: #F1F5F9 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.ui-dropdown-item:hover {
  background: rgba(14, 165, 233, 0.16) !important;
}
.ui-dropdown-avatar {
  background: #1E293B !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
select.form-input,
select,
#crm-t-staff {
  color: #F1F5F9 !important;
  background-color: #0B1220 !important;
}
select.form-input option,
select option,
#crm-t-staff option {
  color: #0B1220 !important;
  background-color: #ffffff !important;
}
#customer-phone-country-list {
  background: #0F172A !important;
  color: #F1F5F9 !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}
#customer-phone-country-list button {
  color: #F1F5F9 !important;
}
#customer-phone-country-list button:hover {
  background: rgba(14, 165, 233, 0.22) !important;
}


/* Refined Rose Tech utilities */
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }
.bg-accent-soft { background-color: var(--accent-soft) !important; }
.text-info, .sync-live { color: var(--info) !important; }
.bg-info-soft { background-color: rgba(13, 148, 136, 0.12) !important; }


/* =====================================================
   Hub motion system
   ===================================================== */
@keyframes sil-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sil-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sil-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes sil-spin {
  to { transform: rotate(360deg); }
}
@keyframes sil-pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes sil-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.sil-page-enter {
  animation: none;
}
.sil-modal-enter {
  animation: sil-scale-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.sil-fade-in {
  animation: sil-fade-in 0.25s ease both;
}

.sil-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 20, 0.55);
  backdrop-filter: blur(4px);
  animation: sil-fade-in 0.2s ease both;
}
.sil-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38BDF8;
  animation: sil-spin 0.75s linear infinite;
}
.sil-skeleton {
  background: linear-gradient(90deg, rgba(30,41,59,0.9) 25%, rgba(51,65,85,0.95) 37%, rgba(30,41,59,0.9) 63%);
  background-size: 200% 100%;
  animation: sil-shimmer 1.4s ease infinite;
  border-radius: 0.5rem;
}

/* Tables on dark */
table {
  color: var(--text);
}
thead {
  color: var(--text-muted);
}
tr {
  border-color: var(--border);
}

/* Product tiles press */
.product-tile {
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.75);
}
.product-tile:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 28px -16px rgba(14, 165, 233, 0.45);
}
.product-tile:active {
  transform: scale(0.96) !important;
}

/* Module cards / admin */
.module-card {
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 16px 32px -18px rgba(14, 165, 233, 0.4);
}
.module-card:active {
  transform: translateY(0) scale(0.98);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.55);
}


/* mobile admin location modal */
@media (max-width: 767px) {
  #location-modal .modal-shell-lg {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
  }
  #location-modal .loc-tab {
    font-size: 0.75rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  #location-modal .loc-tab i {
    margin-right: 0.25rem;
  }
  .safe-area-pb {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}


/* POS Tools list — full-width row highlight (blue scheme) */
#pos-tools-panel .btn,
#pos-tools-scroll .btn {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  justify-content: flex-start !important;
  gap: 0.75rem !important;
  min-height: 3rem !important;
  padding: 0.75rem 1rem !important;
  margin: 0 0 0.4rem 0 !important;
  border-radius: 0.85rem !important;
  border: 1.5px solid rgba(56, 189, 248, 0.22) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #E2E8F0 !important;
  text-align: left !important;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease !important;
}
#pos-tools-panel .btn i,
#pos-tools-scroll .btn i {
  width: 1.25rem !important;
  text-align: center !important;
  color: #7DD3FC !important;
  flex-shrink: 0 !important;
}
#pos-tools-panel .btn:hover,
#pos-tools-panel .btn:focus-visible,
#pos-tools-scroll .btn:hover,
#pos-tools-scroll .btn:focus-visible,
#pos-tools-panel .btn:active,
#pos-tools-scroll .btn:active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.45) 0%, rgba(14, 165, 233, 0.28) 100%) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), inset 0 0 0 1px rgba(56, 189, 248, 0.12) !important;
  color: #F5F3FF !important;
  transform: none !important; /* no lift so highlight stays full width */
}
#pos-tools-panel .btn.hidden,
#pos-tools-scroll .btn.hidden {
  display: none !important;
}


/* Desktop + mobile: tools panel must truly hide (Tailwind md:flex was overriding .hidden) */
#pos-tools-panel.hidden {
  display: none !important;
  pointer-events: none !important;
}


/* Booking dialogs — phone sheet, no overlapping date/time pickers */
@media (max-width: 640px) {
  .bk-dialog-ov {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .bk-dialog-card,
  #bk-form-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(88vh, 100%) !important;
    border-radius: 1.2rem 1.2rem 0 0 !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .bk-dialog-card .grid.grid-cols-2,
  #bk-form-card .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  input.bk-dt,
  #bk-form-overlay input[type="date"],
  #bk-form-overlay input[type="time"] {
    font-size: 16px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* Bookings calendar — fill desktop width, swipe on phones */
.bk-cal-wrap {
  position: relative;
  overflow: hidden;
  animation: none !important;
}
.bk-cal-scroll {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  width: 100%;
  max-width: 100%;
  padding-left: 3rem;
  padding-bottom: 8px;
}
.bk-cal-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  min-width: max-content;
}
.bk-cal-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 8px;
  width: 3rem;
  z-index: 20;
  background: #020617;
  pointer-events: none;
  box-shadow: 6px 0 10px rgba(2, 6, 23, 0.45);
}
.bk-cal-col {
  flex: 1 0 8.75rem;
  min-width: 8.75rem;
  overflow: hidden;
}

.bk-buffer-zone {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c2d12;
  border: 1px solid #d97706;
  border-radius: 4px;
  background-color: #fcd34d;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(146, 64, 14, 0.45) 0,
    rgba(146, 64, 14, 0.45) 2px,
    rgba(252, 211, 77, 0.35) 2px,
    rgba(252, 211, 77, 0.35) 7px
  );
  user-select: none;
  cursor: default;
}

@media (max-width: 767px) {
  .bk-cal-mobile-day .bk-cal-col {
    flex: 1 1 auto !important;
    min-width: 100% !important;
    width: 100% !important;
    max-width: none !important;
  }
  .bk-cal-mobile-day .bk-cal-track {
    width: 100% !important;
    min-width: 100% !important;
  }
  .bk-cal-wrap:not(.bk-cal-mobile-day) .bk-cal-col {
    flex: 0 0 32vw !important;
    min-width: 32vw !important;
    max-width: 38vw !important;
  }
  .bk-cal-scroll {
    scroll-snap-type: x mandatory;
  }
  .bk-cal-wrap:not(.bk-cal-mobile-day) .bk-cal-col {
    scroll-snap-align: start;
  }
}

.bk-block-slot {
  background: #0a0a0a !important;
  border: 1px solid #a1a1aa !important;
  color: #fafafa !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.bk-block-slot,
.bk-block-slot .font-medium,
.bk-block-slot .text-\[11px\],
.bk-block-slot i {
  color: #fafafa !important;
}
.bk-view-btn {
  overflow: visible !important;
  isolation: isolate;
}
.bk-view-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 5px;
  border-radius: 999px;
  background: #7dd3fc;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  z-index: 2;
  box-shadow: 0 0 0 2px #020617;
}
.bk-svc-dur {
  -moz-appearance: textfield;
  appearance: textfield;
}
.bk-svc-dur::-webkit-outer-spin-button,
.bk-svc-dur::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Native-style Bookings chrome (phones) */
.bk-bottom-nav,
.bk-fab,
.bk-more-sheet { display: none; }

@media (max-width: 767px) {
  .bk-app { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px)); }
  .bk-app .bk-top-tabs { display: none !important; }
  .bk-app header.bk-topbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); }
  .bk-app #content-area { padding: 12px 12px 88px !important; }
  .bk-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .bk-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    background: none;
    border: 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .01em;
  }
  .bk-nav-item i { font-size: 17px; }
  .bk-nav-item.is-on { color: #7dd3fc; }
  .bk-fab {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    width: 56px; height: 56px;
    border-radius: 999px;
    border: 0;
    align-items: center;
    justify-content: center;
    background: #0ea5e9;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 24px rgba(14,165,233,.45);
  }
  .bk-fab.hidden { display: none !important; }
  .bk-more-sheet {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2,6,23,.55);
    align-items: flex-end;
    justify-content: center;
  }
  .bk-more-sheet.hidden { display: none !important; }
  .bk-more-card {
    width: 100%;
    background: #0f172a;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    color: #f1f5f9;
  }
  .bk-more-handle {
    width: 40px; height: 4px; border-radius: 99px;
    background: #475569; margin: 4px auto 12px;
  }
  .bk-more-title { font-weight: 700; margin: 0 0 8px; }
  .bk-more-row {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: left;
    padding: 14px 8px;
    background: none; border: 0;
    color: #e2e8f0; font-size: 16px;
    border-bottom: 1px solid rgba(148,163,184,.12);
  }
  .bk-more-row i { width: 1.25rem; color: #7dd3fc; }
  .bk-more-cancel { color: #94a3b8; border-bottom: 0; justify-content: center; }
}

@media (min-width: 768px) {
  .bk-bottom-nav, .bk-fab, .bk-more-sheet { display: none !important; }
}
.bk-dialog-card .btn,
.bk-dialog-ov .btn {
  min-height: 2.6rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (max-width: 767px) {
  .bk-cal-hero-copy { display: none; }
  .bk-desktop-new { display: none !important; }
  .bk-cal-hero-actions { width: 100%; }
  .bk-cal-hero-actions .btn { flex: 1; justify-content: center; padding: .55rem .4rem; font-size: 12px; }
  .bk-app #bk-loc { width: 100% !important; max-width: none; }
}


/* Scroll to top — same as siliscia.com */
button.to-top,
.to-top {
  -webkit-appearance: none !important;
  appearance: none !important;
  position: fixed;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 80;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #7DD3FC;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  overflow: hidden;
  isolation: isolate;
}
.to-top::before,
.to-top::after { display: none !important; content: none !important; }
.to-top.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.to-top:hover { color: #E0F2FE; border-color: #38BDF8; }
.to-top i { font-size: 0.95rem; }
@media (max-width: 899px) {
  .to-top { width: 46px; height: 46px; }
}
