/* Hanout Pro mobile design: dark-purple navigation drawer, merchant-orange action points, readable table rails, and spacious touch targets. */
:root { --hp-purple: #24162f; --hp-orange: #c47a2c; }
.hp-mobile-menu-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; margin-right: 10px; border: 0; border-radius: 12px; background: var(--hp-purple); color: #fff; box-shadow: 0 7px 20px rgba(36,22,47,.18); }
.hp-mobile-menu-toggle:focus-visible,.hp-mobile-menu-close:focus-visible { outline: 3px solid rgba(196,122,44,.48); outline-offset: 3px; }
.hp-mobile-menu-toggle i { font-size: 1.42rem; }
.hp-mobile-menu-close { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(196,122,44,.16); color: var(--hp-orange); }
#hpMobileBackdrop { position: fixed; inset: 0; z-index: 1195; display: block; opacity: 0; pointer-events: none; background: rgba(19,11,28,.63); backdrop-filter: blur(2px); transition: opacity 180ms cubic-bezier(.23,1,.32,1); }

@media (max-width: 991.98px) {
  html,body { min-width: 0; overflow-x: hidden; }
  body.hp-sidebar-open { overflow: hidden; }
  .hp-mobile-menu-toggle { display: inline-flex; flex: 0 0 auto; }
  .hp-mobile-menu-close { display: inline-flex; }
  #hpMobileBackdrop.hp-is-visible { opacity: 1; pointer-events: auto; }
  .left-sidebar.with-vertical { position: fixed !important; top: 0 !important; bottom: 0 !important; left: 0 !important; width: min(86vw, 325px) !important; max-width: 325px !important; height: 100dvh !important; margin: 0 !important; transform: translateX(-108%) !important; transition: transform 220ms cubic-bezier(.23,1,.32,1) !important; z-index: 1200 !important; box-shadow: 18px 0 50px rgba(18,9,25,.28) !important; background: var(--hp-purple) !important; overflow-y: auto !important; }
  body.hp-sidebar-open .left-sidebar.with-vertical { transform: translateX(0) !important; }
  .left-sidebar.with-vertical .brand-logo { min-height: 76px; padding: 14px 16px !important; background: #1c1127; border-bottom: 1px solid rgba(255,255,255,.1); }
  .left-sidebar.with-vertical .brand-logo img { width: 118px !important; max-height: 48px; object-fit: contain; background: #fff; }
  .left-sidebar.with-vertical .sidebar-nav { padding: 14px 12px 26px; }
  .left-sidebar.with-vertical .sidebar-link { min-height: 46px; margin: 3px 0; border-radius: 11px; color: rgba(255,255,255,.82) !important; }
  .left-sidebar.with-vertical .sidebar-link.active,.left-sidebar.with-vertical .sidebar-link:hover { background: rgba(196,122,44,.2) !important; color: #fff !important; }
  .left-sidebar.with-vertical .sidebar-link.active::before { background: var(--hp-orange) !important; }
  .left-sidebar.with-vertical .nav-small-cap { color: rgba(255,255,255,.43) !important; padding: 19px 12px 7px; }
  .page-wrapper { width: 100% !important; min-width: 0 !important; margin-left: 0 !important; }
  .topbar { position: sticky !important; top: 0; z-index: 1100; min-height: 68px; background: rgba(255,255,255,.96) !important; box-shadow: 0 2px 14px rgba(36,22,47,.09); }
  .topbar .navbar { min-height: 68px; padding: 0 14px !important; }
  .topbar .d-block.d-lg-none.py-4 { padding: 0 !important; }
  .topbar .d-block.d-lg-none.py-4 img { width: 102px !important; max-height: 42px; object-fit: contain; }
  .topbar #navbarNav { display: block !important; flex: 0 0 auto; width: auto; }
  .topbar #navbarNav .navbar-nav { flex-direction: row !important; }
  .topbar .navbar-toggler { display: none !important; }
  .body-wrapper { min-width: 0; }
  .body-wrapper .container-fluid { padding: 16px !important; }
  .body-wrapper .container-fluid > .card:first-child { margin-bottom: 16px !important; }
  .body-wrapper .container-fluid > .card:first-child .card-body { padding: 20px !important; }
  .body-wrapper .container-fluid > .card:first-child .col-9 { width: 100%; }
  .body-wrapper .container-fluid > .card:first-child .col-3 { display: none; }
  .body-wrapper .container-fluid > .card:first-child h4,.body-wrapper .container-fluid > .card:first-child h5 { font-size: 1.25rem; line-height: 1.25; }
  .card { border-radius: 15px !important; }
  .card-body { padding: 17px !important; }
  .filter-controls > [class*="col-"],.row.g-3 > [class*="col-"],.row.g-4 > [class*="col-"] { width: 100%; }
  .filter-controls .form-control,.filter-controls .form-select { min-height: 46px; margin-right: 0 !important; }
  .filter-controls .btn,.stores-toolbar .btn,.users-toolbar .btn,.operations-toolbar .btn { width: 100%; min-height: 46px; }
  .hp-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
  .hp-table-scroll > .table { width: max-content; min-width: 720px; margin-bottom: 0; }
  .hp-table-scroll > .table th,.hp-table-scroll > .table td { white-space: nowrap; padding: .78rem .85rem !important; font-size: .77rem !important; }
  .action-btns { min-width: 142px; display: flex; flex-wrap: wrap; gap: 5px; }
  .action-btns .btn { margin: 0 !important; }
  .stores-hero,.users-hero,.operations-hero { padding: 22px 18px !important; }
  .stores-hero h1,.users-hero h1,.operations-hero h1 { color: #ffffff !important; font-size: 1.55rem !important; line-height: 1.15; }
  .stores-hero::after,.users-hero::after,.operations-hero::after { z-index: 0 !important; pointer-events: none; }
  .stores-hero .card-body,.users-hero .card-body,.operations-hero .card-body { position: relative; z-index: 1 !important; }
  .stores-kpi-grid,.users-kpi-grid,.operations-kpi-grid,.store-kpi-grid,.user-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 9px !important; }
  .stores-toolbar,.users-toolbar,.operations-toolbar { display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important; }
  .stores-toolbar > *,.users-toolbar > *,.operations-toolbar > * { width: 100% !important; }
  .offcanvas { width: min(94vw, 560px) !important; }
  .offcanvas-header { padding: 16px !important; }
  .offcanvas-body { padding: 15px !important; }
  .store-profile-meta,.user-profile-meta { grid-template-columns: 1fr !important; }
  .store-kpi,.user-kpi { min-width: 0; padding: 12px !important; }
  .store-kpi b,.user-kpi b { font-size: .95rem !important; overflow-wrap: anywhere; }
  .modal-dialog { margin: 12px !important; }
  .modal-content { border-radius: 16px !important; }
  .modal-footer { flex-wrap: wrap; gap: 8px; }
  .modal-footer .btn { flex: 1 1 140px; min-height: 44px; }
}

@media (max-width: 479.98px) {
  .topbar .navbar { padding: 0 10px !important; }
  .topbar .d-block.d-lg-none.py-4 img { width: 90px !important; }
  .body-wrapper .container-fluid { padding: 12px !important; }
  .card-body { padding: 14px !important; }
  .stores-kpi-grid,.users-kpi-grid,.operations-kpi-grid,.store-kpi-grid,.user-kpi-grid { grid-template-columns: 1fr !important; }
  .hp-table-scroll > .table { min-width: 640px; }
  .hp-table-scroll > .table th,.hp-table-scroll > .table td { padding: .7rem .65rem !important; font-size: .72rem !important; }
  .topbar .nav-link img { width: 32px !important; height: 32px !important; }
  .stores-hero::after,.users-hero::after,.operations-hero::after { display: none; }
  .stores-priority-strip { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .stores-priority:last-child { grid-column: span 2; }
  .stores-priority span { font-size: 9px !important; }
  .stores-priority b { font-size: 18px !important; }
}

@media (prefers-reduced-motion: reduce) { .left-sidebar.with-vertical,#hpMobileBackdrop { transition: none !important; } }
