/* Store owner PWA — mobile shell. Desktop CRM stays unchanged. */

:root {
  --owner-primary: #0488CB;
  --owner-primary-dark: #026AA0;
  --owner-sky: #36B4EA;
  --owner-cream: #F7F3EC;
  --owner-ink: #1C1917;
  --owner-safe-b: env(safe-area-inset-bottom, 0px);
  --owner-safe-t: env(safe-area-inset-top, 0px);
  --owner-tab-h: calc(64px + var(--owner-safe-b));
}

.store-appbar,
.store-tabbar,
.store-more,
.store-hrm-nav {
  display: none;
}

@media (max-width: 1023px) {
  html:has(body.store-app),
  body.store-app {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  body.store-app {
    margin: 0;
    background: #f3f6fb;
    -webkit-tap-highlight-color: transparent;
  }

  .store-app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .store-desktop-sidebar,
  #sidebar-overlay {
    display: none !important;
  }

  .store-desktop-topbar #sidebar-toggle,
  .store-desktop-topbar .store-topbar-chrome,
  .store-desktop-topbar .store-header-bell {
    display: none !important;
  }
  .store-desktop-topbar .page-header {
    position: relative;
    z-index: 10;
    border-bottom: 0;
    background: transparent;
    padding: 0 14px 8px;
    backdrop-filter: none;
  }
  .store-desktop-topbar .page-header > div {
    min-height: 0;
    padding: 0;
    justify-content: flex-end;
  }
  .store-desktop-topbar .store-header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .store-desktop-topbar:not(:has(.store-header-actions > :not(.store-header-bell))) {
    display: none;
  }

  .store-desktop-frame {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
  }

  .store-desktop-col {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding-left: 0 !important;
  }

  .store-app-main {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(var(--owner-tab-h) + 16px);
  }

  .store-appbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: calc(10px + var(--owner-safe-t)) 16px 10px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(28, 25, 23, 0.06);
    backdrop-filter: blur(16px);
    z-index: 30;
  }

  .store-appbar-logo {
    height: 36px;
    width: 36px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(4, 136, 203, 0.22);
  }

  .store-appbar-meta { min-width: 0; flex: 1; }
  .store-appbar-kicker {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
  }
  .store-appbar-title {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--owner-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .store-appbar-btn {
    display: inline-flex;
    position: relative;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: #eef6fb;
    color: var(--owner-primary-dark);
    text-decoration: none;
  }

  .store-appbar-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
  }

  .store-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + var(--owner-safe-b));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(28, 25, 23, 0.06);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 40;
  }

  .cms-upload-progress.is-fixed {
    bottom: calc(var(--owner-tab-h) + 12px);
  }

  .store-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
  }
  .store-tab i { font-size: 16px; }
  .store-tab.is-active {
    color: var(--owner-primary);
    background: rgba(4, 136, 203, 0.08);
  }

  .store-more {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
  }
  .store-more[hidden] { display: none !important; }
  .store-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
  }
  .store-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(86dvh, 720px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px calc(20px + var(--owner-safe-b));
    border-radius: 22px 22px 0 0;
    background: #fff;
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.18);
  }
  .store-more-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #e2e8f0;
  }
  .store-more-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
  }
  .store-more-group {
    margin: 0 0 16px;
  }
  .store-more-group p {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
  }
  .store-more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .store-more-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--owner-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
  }
  .store-more-link i {
    width: 18px;
    color: var(--owner-primary);
    text-align: center;
  }
  .store-more-link.is-on {
    background: rgba(4, 136, 203, 0.1);
    color: var(--owner-primary-dark);
  }
  .store-more-link.is-wide { grid-column: 1 / -1; }

  .store-app-main .xl\:grid-cols-4,
  .store-app-main .xl\:grid-cols-12,
  .store-app-main .lg\:grid-cols-12,
  .store-app-main .lg\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  .store-app-main .xl\:col-span-4,
  .store-app-main .xl\:col-span-5,
  .store-app-main .xl\:col-span-7,
  .store-app-main .xl\:col-span-8,
  .store-app-main .lg\:col-span-4,
  .store-app-main .lg\:col-span-8 {
    grid-column: auto;
  }
  .store-app-main .overflow-x-auto,
  .store-app-main .overflow-x-scroll {
    margin-inline: -4px;
    padding-bottom: 6px;
  }
  .store-app-main table {
    font-size: 13px;
  }
  .store-app-main .form-input,
  .store-app-main input[type="text"],
  .store-app-main input[type="email"],
  .store-app-main input[type="number"],
  .store-app-main input[type="date"],
  .store-app-main select,
  .store-app-main textarea {
    max-width: 100%;
  }
  .store-app-main .min-w-\[640px\],
  .store-app-main .min-w-\[680px\],
  .store-app-main .min-w-\[720px\],
  .store-app-main .min-w-\[760px\],
  .store-app-main .min-w-\[800px\],
  .store-app-main .min-w-\[960px\],
  .store-app-main .min-w-\[1040px\] {
    min-width: 560px;
  }

  .store-app-main form .flex.items-end,
  .store-app-main form .flex.items-center,
  .store-app-main .flex.flex-wrap.items-end,
  .store-app-main .flex.flex-wrap.gap-3 {
    flex-wrap: wrap;
  }
  .store-app-main .sm\:grid-cols-2,
  .store-app-main .sm\:grid-cols-3,
  .store-app-main .md\:grid-cols-2,
  .store-app-main .md\:grid-cols-3,
  .store-app-main .lg\:grid-cols-3,
  .store-app-main .lg\:grid-cols-4 {
    grid-template-columns: 1fr;
  }
  .store-app-main .w-64,
  .store-app-main .w-56,
  .store-app-main .w-48,
  .store-app-main .sm\:w-48,
  .store-app-main .min-w-\[220px\] {
    width: 100%;
    min-width: 0;
  }
  .store-app-main table {
    max-width: none;
  }
  .store-app-main table th,
  .store-app-main table td {
    white-space: nowrap;
  }
  .store-app-main .page-heading,
  .store-app-main h1 {
    overflow-wrap: anywhere;
  }

  body:has(.store-menu-app) .store-desktop-topbar {
    display: none !important;
  }
  .store-hide-on-phone { display: none !important; }

  .store-app-main:has(.store-menu-app) {
    padding: 10px 12px calc(var(--owner-tab-h) + 18px);
  }

  .store-menu-hero { display: none; }

  .store-menu-app {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .store-menu-app > .grid { gap: 12px; }

  .store-menu-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .store-menu-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 78px;
    padding: 10px 4px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    color: #1c1917;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
  }
  .store-menu-shortcut i {
    display: flex;
    height: 34px;
    width: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(4, 136, 203, 0.1);
    color: #026AA0;
    font-size: 15px;
  }
  .store-menu-shortcut.is-off {
    opacity: 0.45;
    pointer-events: none;
  }

  .store-menu-tabs {
    display: flex;
    padding: 4px;
    border-radius: 16px;
    background: #e8eef5;
  }
  .store-menu-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
  }
  .store-menu-tab.is-on {
    background: #fff;
    color: #026AA0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  }

  .store-menu-pane { display: none !important; }
  .store-menu-pane.is-on { display: grid !important; }

  .store-menu-card {
    padding: 16px !important;
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05) !important;
  }
  .store-menu-card-head h2 { font-size: 15px; }
  .store-menu-card-head p { font-size: 12px; }

  .store-menu-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-size: 10px;
    font-weight: 800;
  }

  .store-menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .store-menu-actions form { margin: 0; }
  .store-menu-card > form .store-menu-action { width: 100%; }
  .store-menu-actions .store-menu-action,
  .store-menu-actions button.store-menu-action {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
  }
  .store-menu-action-desk { display: none !important; }

  .store-menu-file-native {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }
  .store-menu-drop {
    position: relative;
    display: block;
    overflow: hidden;
  }
  .store-menu-drop-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 132px;
    padding: 18px 14px;
    border: 1.5px dashed #93c5fd;
    border-radius: 18px;
    background: linear-gradient(180deg, #f0f9ff, #fff);
    text-align: center;
  }
  .store-menu-drop-ui i {
    display: flex;
    height: 42px;
    width: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border-radius: 14px;
    background: #0488CB;
    color: #fff;
    font-size: 18px;
  }
  .store-menu-drop-ui strong {
    font-size: 15px;
    font-weight: 800;
    color: #1c1917;
  }
  .store-menu-drop-ui em {
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    color: #026AA0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .store-menu-drop-ui small { color: #64748b; font-size: 11px; }
  .store-menu-drop.is-ready .store-menu-drop-ui {
    border-color: #0488CB;
    background: #eff8ff;
  }

  .store-menu-submit {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    background: linear-gradient(180deg, #36B4EA, #0488CB);
    box-shadow: 0 12px 24px rgba(4, 136, 203, 0.24);
    font-size: 15px;
    font-weight: 800;
  }

  .store-menu-preview img { max-height: 220px; }

  .store-app-main:has(.menu-tag-workspace) {
    padding: 10px 10px calc(var(--owner-tab-h) + 12px);
  }
  .store-app-main .menu-tag-palette {
    position: sticky;
    top: 0;
    z-index: 12;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 10px !important;
    padding: 10px !important;
    background: #fff;
    border: 0 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }
  .store-app-main .menu-tag-chip,
  .store-app-main .menu-tag-manage {
    flex-shrink: 0;
    min-height: 40px;
  }
  .store-app-main .menu-page-nav {
    position: sticky;
    top: 62px;
    z-index: 11;
    padding: 8px 4px;
    background: #f3f6fb;
  }
  .store-app-main .menu-page-nav-btn {
    min-height: 42px;
    padding: 0 12px;
  }
  .store-app-main .menu-tag-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .store-app-main .menu-tag-style-btn {
    min-height: 64px;
  }

  body:has(.store-pwa-page) .store-desktop-topbar {
    display: none !important;
  }
  .store-app-main:has(.store-pwa-page) {
    padding: 10px 12px calc(var(--owner-tab-h) + 18px);
  }

  .store-pwa-tools,
  .store-pwa-cards,
  .store-pwa-back,
  .store-pwa-tabs {
    display: flex;
  }
  .store-pwa-desk { display: none !important; }

  .store-pwa-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .store-pwa-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .store-pwa-tools a,
  .store-pwa-tools button,
  .store-pwa-primary {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #1c1917;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }
  .store-pwa-primary {
    background: linear-gradient(180deg, #36B4EA, #0488CB);
    color: #fff;
    box-shadow: 0 12px 24px rgba(4, 136, 203, 0.22);
  }
  .store-pwa-tools form,
  .store-pwa-tools-file {
    display: flex;
    flex: 1 1 auto;
    margin: 0;
  }
  .store-pwa-tools form button,
  .store-pwa-tools-file span {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #1c1917;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    cursor: pointer;
  }
  .store-pwa-tools form .store-pwa-primary {
    background: linear-gradient(180deg, #36B4EA, #0488CB);
    color: #fff;
    box-shadow: 0 12px 24px rgba(4, 136, 203, 0.22);
  }

  .store-pwa-tabs {
    display: flex;
    padding: 4px;
    border-radius: 16px;
    background: #e8eef5;
  }
  .store-pwa-tabs [data-pwa-tab] {
    flex: 1;
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
  }
  .store-pwa-tabs [data-pwa-tab].is-on {
    background: #fff;
    color: #026AA0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  }
  .store-pwa-pane { display: none !important; }
  .store-pwa-pane.is-on { display: block !important; }

  .store-pwa-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .store-pwa-item {
    padding: 14px 14px 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }
  .store-pwa-item h3,
  .store-pwa-item .store-pwa-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #1c1917;
    line-height: 1.35;
  }
  .store-pwa-meta {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
  }
  .store-pwa-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .store-pwa-item-actions a,
  .store-pwa-item-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1c1917;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }
  .store-pwa-item-actions .is-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #e11d48;
  }
  .store-pwa-item-actions form { margin: 0; }

  .store-pwa-empty {
    padding: 36px 16px;
    border-radius: 18px;
    background: #fff;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
  }

  .store-pwa-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    min-height: 40px;
    padding: 0 4px;
    color: #026AA0;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  .store-pwa-page .stat-card { min-height: 112px; padding: 16px; }
  .store-pwa-page .stat-card p.mt-2.text-2xl,
  .store-pwa-page .stat-card p.mt-2.text-3xl { font-size: 1.25rem; }
  .store-dash-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .store-dash-shortcuts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 78px;
    border-radius: 16px;
    background: #fff;
    color: #1c1917;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  }
  .store-dash-shortcuts i {
    display: flex;
    height: 34px;
    width: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(4, 136, 203, 0.1);
    color: #026AA0;
  }
  .store-dash-desk { display: none !important; }
  .store-dash-qr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 0 !important;
    border-radius: 20px !important;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }
  .store-dash-qr img { height: 88px; width: 88px; }
  .store-dash-info {
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
  }

  .store-pwa-page .form-input,
  .store-pwa-page input[type="text"],
  .store-pwa-page input[type="number"],
  .store-pwa-page input[type="email"],
  .store-pwa-page input[type="datetime-local"],
  .store-pwa-page select,
  .store-pwa-page textarea {
    min-height: 46px;
    border-radius: 14px;
  }
  .store-pwa-page button[type="submit"],
  .store-pwa-save {
    width: 100%;
    min-height: 50px;
    border-radius: 16px !important;
  }
  .store-pwa-tools button[type="submit"],
  .store-pwa-item-actions button[type="submit"] {
    width: auto;
    min-height: 40px;
    border-radius: 12px !important;
  }
  .store-pwa-page .sticky.bottom-4,
  .store-app-main .sticky.bottom-4 {
    position: sticky;
    bottom: calc(var(--owner-tab-h) + 8px);
    margin: 0 -2px;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .store-review-list > article {
    padding: 14px !important;
    margin: 0 0 10px;
    border: 0 !important;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }
  .store-review-list > article textarea { min-height: 88px; }
  .store-review-list > article button[type="submit"] { min-height: 46px; width: 100%; }

  .store-tag-card {
    border: 0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    padding: 14px !important;
  }
  .store-tag-card button[type="submit"] { width: 100%; min-height: 44px; }

  .store-app-main .prize-row,
  .store-app-main .item-row {
    display: block;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
  }
  .store-app-main #prize-rows,
  .store-app-main #item-rows {
    display: block;
  }
  .store-app-main .prize-row td,
  .store-app-main .item-row td {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 0;
    border: 0;
  }
  .store-app-main #prize-rows + * ,
  .store-app-main table:has(#prize-rows),
  .store-app-main table:has(#item-rows) {
    min-width: 0 !important;
    width: 100%;
  }
  .store-app-main table:has(#prize-rows) thead,
  .store-app-main table:has(#item-rows) thead {
    display: none;
  }
  .store-app-main .prize-row td::before,
  .store-app-main .item-row td::before {
    flex: 0 0 88px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }
  .store-app-main .prize-row td:nth-child(1)::before { content: "Nhãn"; }
  .store-app-main .prize-row td:nth-child(2)::before { content: "Tên"; }
  .store-app-main .prize-row td:nth-child(3)::before { content: "Tỷ lệ"; }
  .store-app-main .prize-row td:nth-child(4)::before { content: "Loại"; }
  .store-app-main .prize-row td:nth-child(5)::before { content: "Màu"; }
  .store-app-main .prize-row td:nth-child(6)::before { content: ""; flex-basis: 0; }
  .store-app-main .item-row td:nth-child(1)::before { content: "Emoji"; }
  .store-app-main .item-row td:nth-child(2)::before { content: "Tên"; }
  .store-app-main .item-row td:nth-child(3)::before { content: "Loại"; }
  .store-app-main .item-row td:nth-child(4)::before { content: "Điểm"; }
  .store-app-main .item-row td:nth-child(5)::before { content: "Tỉ lệ"; }
  .store-app-main .item-row td:nth-child(6)::before { content: ""; flex-basis: 0; }
  .store-app-main .prize-row .form-input,
  .store-app-main .item-row .form-input { min-width: 0; flex: 1; }

  .store-report-filter {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
    padding: 14px !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
  }
  .store-report-filter > div { width: 100%; }
  .store-report-filter .xl\:col-span-2,
  .store-report-filter .xl\:col-span-3,
  .store-report-filter .xl\:col-span-4 {
    grid-column: auto;
  }
  .store-report-filter .store-report-filter-wide { grid-column: 1 / -1; }
  .store-report-filter button[type="submit"] {
    min-height: 46px;
    border-radius: 14px !important;
  }

  .store-report-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .store-report-stats > article {
    border: 0 !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }
  .store-report-stats > article p.mt-2.text-3xl,
  .store-report-stats > article p.mt-2.text-2xl {
    font-size: 1.35rem;
    margin-top: 6px;
  }

  .store-report-block {
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
  }
  .store-report-block .border-b { padding: 14px !important; }
  .store-report-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .store-report-chips a {
    min-height: 34px;
    padding: 0 12px !important;
  }

  .store-report-hour {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
  }

  .store-hrm-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 8px;
    margin: -10px -12px 0;
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(243, 246, 251, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .store-hrm-nav::-webkit-scrollbar { display: none; }
  .store-hrm-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  }
  .store-hrm-chip i { font-size: 13px; color: var(--owner-primary); }
  .store-hrm-chip.is-on {
    background: linear-gradient(180deg, var(--owner-sky), var(--owner-primary));
    color: #fff;
    box-shadow: 0 8px 18px rgba(4, 136, 203, 0.25);
  }
  .store-hrm-chip.is-on i { color: #fff; }
  .store-app-main:has(.store-hrm-nav) > .store-pwa-page { margin-top: 12px; }

  .store-hrm-hero { display: none !important; }
  .store-hrm-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .store-hrm-stats > article,
  .store-hrm-stats .stat-card {
    min-height: 0;
    padding: 14px !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }
  .store-hrm-stats > article p.mt-2.text-3xl,
  .store-hrm-stats > article p.mt-2.text-2xl,
  .store-hrm-stats .stat-card p.mt-2.text-3xl,
  .store-hrm-stats .stat-card p.mt-2.text-2xl {
    font-size: 1.35rem;
    margin-top: 6px;
  }
  .store-hrm-block {
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
  }
  .store-hrm-block > .border-b,
  .store-hrm-block .border-b.border-slate-100 { padding: 14px !important; }
  .store-hrm-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 2px 4px 4px;
  }
  .store-hrm-chips a,
  .store-hrm-chips span {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px !important;
    white-space: nowrap;
  }
  .store-hrm-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .store-hrm-person > span:first-child,
  .store-hrm-person > div:first-child {
    flex-shrink: 0;
  }
  .store-hrm-item-net {
    margin: 8px 0 0;
    font-size: 18px;
    font-weight: 800;
    color: #026AA0;
  }
  .store-hrm-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .store-pwa-pane.is-on.store-hrm-stats,
  .store-pwa-pane.is-on.grid {
    display: grid !important;
  }
  .store-hrm-pwa #shift-flow,
  .store-hrm-pwa #shift-stats,
  .store-hrm-pwa #shift-list,
  .store-hrm-pwa #shift-assign,
  .store-hrm-pwa #shift-setup,
  .store-hrm-pwa section.rounded-2xl {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }
  .store-hrm-pwa .min-w-0.space-y-6.xl\:col-span-4 {
    display: contents;
  }
  .store-hrm-pwa details > form {
    width: 100% !important;
  }
  .store-hrm-pwa .divide-y > article {
    padding: 14px !important;
    margin: 0 0 10px;
    border: 0 !important;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }
  .store-hrm-pwa .divide-y { border: 0; }
  .store-hrm-pwa .action-btn {
    min-height: 40px;
    min-width: 40px;
  }

  .store-sys-hero { display: none !important; }
  .store-qr-card {
    border: 0 !important;
    border-radius: 22px !important;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05) !important;
    padding: 20px 16px !important;
    text-align: center;
  }
  .store-qr-card img {
    height: 220px;
    width: 220px;
    max-width: 100%;
  }
  .store-qr-link {
    display: block;
    overflow-wrap: anywhere;
    border-radius: 14px;
    background: #f8fafc;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #026AA0;
    text-decoration: none;
  }
  .store-settings-nav { display: none !important; }
  .store-settings-mnav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 4px;
  }
  .store-settings-mnav .settings-tab {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #e8eef5;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }
  .store-settings-mnav .settings-tab-active {
    background: #fff;
    color: #026AA0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  }
  .store-settings-app .settings-panel > div,
  .store-settings-app .rounded-2xl.border {
    border: 0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
    padding: 16px !important;
  }
  .store-settings-app #store-logo-file + *,
  .store-settings-app label.flex.h-36 {
    width: 100%;
    max-width: none;
    height: 140px;
  }
  .store-settings-app label.flex.h-28 {
    width: 100%;
    max-width: none;
  }
  .store-settings-app .sticky.bottom-4 > .flex > p {
    display: none;
  }
  .store-settings-app #store-geo-btn,
  .store-hrm-pwa .store-geo-btn,
  .store-hrm-pwa .store-wifi-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
  }
  .store-pwa-page input[type="search"],
  .store-pwa-page input[type="date"],
  .store-pwa-page input[type="datetime-local"],
  .store-pwa-page input[type="password"] {
    min-height: 46px;
    border-radius: 14px;
  }
}

/* Login PWA */
body.store-pwa-body {
  margin: 0;
  min-height: 100dvh;
  background: #0b1b2b;
  font-family: "Be Vietnam Pro", "Segoe UI", Tahoma, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.store-pwa-shell {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: #f3f6fb;
}

.store-pwa-login {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background:
    radial-gradient(120% 70% at 10% -10%, rgba(54, 180, 234, 0.35), transparent 46%),
    radial-gradient(90% 50% at 110% 10%, rgba(4, 136, 203, 0.45), transparent 42%),
    linear-gradient(180deg, #026AA0 0%, #0488CB 42%, #F7F3EC 42%);
}

.store-pwa-hero {
  padding: calc(28px + var(--owner-safe-t)) 24px 36px;
  color: #fff;
}

.store-pwa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-pwa-brand img {
  height: 52px;
  width: 52px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.store-pwa-hero h1 {
  margin: 22px 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.store-pwa-hero p {
  margin: 0;
  max-width: 20rem;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.store-pwa-card {
  flex: 1;
  margin-top: -8px;
  border-radius: 28px 28px 0 0;
  background: #fff;
  padding: 24px 20px calc(24px + var(--owner-safe-b));
  box-shadow: 0 -12px 40px rgba(2, 106, 160, 0.12);
}

.store-pwa-field { display: block; margin-bottom: 14px; }
.store-pwa-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}
.store-pwa-field input[type="text"],
.store-pwa-field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
}
.store-pwa-field input:focus {
  border-color: var(--owner-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(4, 136, 203, 0.12);
}
.store-pwa-pass { position: relative; }
.store-pwa-pass button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
}
.store-pwa-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #36B4EA, #0488CB);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 16px;
  box-shadow: 0 12px 24px rgba(4, 136, 203, 0.28);
}
.store-pwa-install {
  display: none;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f0f9ff;
  color: var(--owner-primary-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
}
.store-pwa-install.is-visible { display: flex; align-items: center; justify-content: center; gap: 8px; }
.store-pwa-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; margin: 4px 0 12px; }
.store-pwa-flash {
  margin-bottom: 14px;
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 600;
}
.store-pwa-flash-ok { background: #ecfdf5; color: #047857; }
.store-pwa-flash-err { background: #fff1f2; color: #be123c; }
.store-pwa-hide { display: none !important; }

/* Menu số — desktop giữ card CRM, mobile thành app */
.store-menu-shortcuts,
.store-menu-tabs,
.store-menu-drop-ui,
.store-menu-badge {
  display: none;
}
.store-menu-file-native { display: block; width: 100%; }
.store-menu-filebox {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px 16px;
}
.store-menu-fileico {
  display: flex;
  height: 44px;
  width: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 18px;
}
.store-menu-filemeta { min-width: 0; flex: 1; }
.store-menu-filename {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1c1917;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-menu-filesize { margin: 2px 0 0; font-size: 12px; color: #64748b; }
.store-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.store-menu-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1c1917;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.store-menu-action.is-danger { border-color: #fecdd3; color: #e11d48; }
.store-menu-empty {
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 28px 16px;
  text-align: center;
}
.store-menu-empty i { display: block; margin-bottom: 8px; font-size: 22px; color: #94a3b8; }
.store-menu-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #0284c7;
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
}
.store-menu-preview {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.store-menu-preview img {
  display: block;
  width: 100%;
  max-height: 288px;
  object-fit: contain;
  background: #f1f5f9;
}

.store-pwa-tools,
.store-pwa-cards,
.store-pwa-back,
.store-pwa-tabs,
.store-dash-shortcuts,
.store-settings-mnav {
  display: none;
}

/* Custom select: menu gắn body + fixed — không bị card overflow cắt mất danh sách kỳ lương */
.cselect-menu {
  position: fixed !important;
  z-index: 10050 !important;
  margin-top: 0 !important;
  left: auto;
  right: auto;
}
.cselect-menu.is-open {
  display: block !important;
}
