/* Keep the signed-in header usable on compact tablets (the phone nav begins at 600px). */
@media (min-width: 601px) and (max-width: 767px) {
  .bobo-refresh.member-layout .header-inner {
    min-height: 62px;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 14px;
  }

  .bobo-refresh.member-layout .brand small,
  .bobo-refresh.member-layout .sidebar,
  .member-layout #logout-trigger { display: none; }

  .bobo-refresh.member-layout .header-actions {
    flex-wrap: nowrap;
    gap: 6px;
    margin-left: auto;
  }

  .bobo-refresh.member-layout .app-layout { padding: 22px 16px 104px; }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    min-height: 72px;
    padding: 9px 6px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #e7edf4;
    background: #fff;
    box-shadow: 0 -4px 20px #173b5809;
  }

  .mobile-bottom-nav > a,
  .mobile-more > summary {
    display: flex;
    min-height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #7e8b9a;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
  }

  .mobile-more > summary::-webkit-details-marker { display: none; }
  .mobile-bottom-nav > a > span,
  .mobile-more > summary > span { font-size: 25px; line-height: 28px; }
  .mobile-bottom-nav > a.is-active,
  .mobile-bottom-nav .mobile-convert { color: #087cff; }

  .mobile-bottom-nav .mobile-convert > span {
    display: grid;
    width: 53px;
    height: 53px;
    margin-top: -30px;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #26a6ff, #0872f5);
    box-shadow: 0 3px 12px #137cf52a;
    color: #fff;
    font-size: 30px;
  }

  .mobile-more-menu {
    position: absolute;
    right: 10px;
    bottom: calc(100% + 10px);
    width: 220px;
    padding: 10px;
    border: 1px solid #dce9f7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 35px #18385925;
  }

  .mobile-more-menu a {
    display: block;
    padding: 12px;
    border-radius: 8px;
    color: #24486b;
    font-size: 14px;
  }

  .mobile-more-menu a:hover { background: #edf6ff; }
  .mobile-more[open] > summary { color: #087cff; }
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav summary:focus-visible { outline: 2px solid #087cff; outline-offset: 2px; }
}

@media (max-width: 600px) {
  .bobo-refresh.member-layout #logout-trigger { display: none; }
}

/* Refined icon navigation for phones and compact tablets. */
@media (max-width: 767px) {
  .mobile-bottom-nav {
    min-height: 68px;
    align-items: stretch;
    gap: 3px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid #e6edf6;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 26px rgba(25, 54, 88, .09);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > .mobile-more > summary,
  .mobile-bottom-nav > .admin-tools-mobile-toggle {
    min-width: 0;
    min-height: 54px;
    justify-content: center;
    gap: 3px;
    padding: 2px 1px;
    border-radius: 12px;
    color: #7a8798;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
  }

  .mobile-nav-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 28px;
    place-items: center;
    border-radius: 10px;
    color: currentColor;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
  }

  .mobile-nav-icon svg {
    display: block;
    width: 22px;
    height: 22px;
  }

  .mobile-bottom-nav > a.is-active,
  .mobile-bottom-nav > .mobile-more[open] > summary,
  .mobile-bottom-nav > .admin-tools-mobile-toggle[aria-expanded="true"] {
    color: #176fe3;
  }

  .mobile-bottom-nav > a.is-active .mobile-nav-icon,
  .mobile-bottom-nav > .mobile-more[open] > summary .mobile-nav-icon,
  .mobile-bottom-nav > .admin-tools-mobile-toggle[aria-expanded="true"] .mobile-nav-icon {
    background: #eaf3ff;
  }

  .mobile-bottom-nav .mobile-convert {
    justify-content: flex-start;
    gap: 2px;
    color: #176fe3;
    font-weight: 700;
    font-size: 11px;
  }

  .mobile-bottom-nav .mobile-convert .mobile-nav-icon {
    box-sizing: border-box;
    flex-basis: 62px;
    width: 62px;
    height: 62px;
    margin-top: -25px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #35a5ff, #1764ed);
    box-shadow: 0 5px 15px rgba(23, 100, 237, .27);
    color: #fff;
  }

  .mobile-bottom-nav .mobile-convert .mobile-nav-icon svg { width: 26px; height: 26px; }
  .mobile-bottom-nav .mobile-convert.is-active .mobile-nav-icon { background: linear-gradient(145deg, #258df5, #145bda); }
  .mobile-bottom-nav > .admin-tools-mobile-toggle { font-family: inherit; cursor: pointer; }
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav summary:focus-visible,
  .mobile-bottom-nav button:focus-visible { outline: 2px solid #176fe3; outline-offset: 2px; }
}

@media (max-width: 360px) {
  .mobile-bottom-nav .mobile-convert .mobile-nav-icon {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    margin-top: -20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-icon { transition: none; }
}
/* Stable workspace header: navigation occupies its own row when space is limited. */
@media(min-width:768px){
 .bobo-refresh.member-layout .header-inner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 24px;max-width:1480px;margin:auto;padding:14px 24px}
 .bobo-refresh.member-layout .brand{grid-column:1;grid-row:1}
 .bobo-refresh.member-layout .header-actions{grid-column:2;grid-row:1;justify-self:end;margin:0}
 .bobo-refresh.member-layout .sidebar{display:block;grid-column:1/-1;grid-row:2;order:initial;width:100%;min-width:0}
 .bobo-refresh.member-layout .navigation>summary{display:none}
 .bobo-refresh.member-layout .nav-list{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;overflow:visible}
 .bobo-refresh.member-layout .nav-item{min-height:44px;padding:10px 16px;white-space:nowrap}
 .bobo-refresh.member-layout .desktop-more{align-self:center}
 .bobo-refresh.member-layout .desktop-more-menu{position:absolute;top:100%;right:0;box-shadow:0 10px 30px #173b5820}
}
@media(min-width:1500px){
 .bobo-refresh.member-layout .header-inner{grid-template-columns:auto minmax(0,1fr) auto}
 .bobo-refresh.member-layout .sidebar{grid-column:2;grid-row:1}
 .bobo-refresh.member-layout .header-actions{grid-column:3}
 .bobo-refresh.member-layout .nav-list{justify-content:center;gap:2px}
 .bobo-refresh.member-layout .nav-item{padding:10px 12px}
}
.bobo-refresh.admin-layout .admin-navigation{padding:8px;gap:6px;margin-bottom:24px}
.bobo-refresh.admin-layout .admin-navigation a{min-height:44px;padding:10px 14px}
.bobo-refresh.admin-layout .admin-navigation a[aria-current=page]{background:#1764ed;color:white;box-shadow:none}
.import-workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;align-items:start}
.import-workspace .panel{margin:0!important}
.import-workspace .order-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.import-workspace .csv-fields{grid-template-columns:1fr!important}
.import-feedback{scroll-margin-top:24px}
.import-submit-status{margin:12px 0 0;color:#1764ed;font-weight:600}
@media(max-width:900px){.import-workspace{grid-template-columns:1fr}}
@media(max-width:767px){
 .bobo-refresh.admin-layout .admin-navigation{flex-wrap:nowrap;overflow-x:auto;max-width:100%;scrollbar-width:thin}
 .bobo-refresh.admin-layout .app-layout{padding-bottom:110px}
 .import-workspace .order-filters{grid-template-columns:1fr!important}
}
html[data-theme=dark] .bobo-refresh.admin-layout .admin-navigation a[aria-current=page]{background:#2874e8;color:#fff}
.import-workspace{margin-bottom:24px}.import-workspace .order-filters{margin-bottom:16px}
/* Content-only navigation; preserve layout while the server responds. */
.navigation-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:1000;overflow:hidden;background:#dceaff}
.navigation-progress::after{content:"";display:block;width:35%;height:100%;background:#1764ed;animation:bobo-loading 1s ease-in-out infinite}
.navigation-feedback{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:1001;max-width:calc(100% - 32px);width:max-content;padding:12px 18px;border:1px solid #d5e4f7;border-radius:12px;background:#fff;color:#173457;box-shadow:0 6px 24px #17345720;font-size:14px}
.navigation-feedback a{margin-left:12px;text-decoration:underline;font-weight:600}.navigation-feedback.is-error{border-color:#d89537}
.navigation-progress[hidden],.navigation-feedback[hidden],.navigation-feedback a[hidden]{display:none}
.page-enter{animation:bobo-page-in .16s ease-out}
@keyframes bobo-loading{from{transform:translateX(-100%)}to{transform:translateX(390%)}}
@keyframes bobo-page-in{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(max-width:767px){.navigation-feedback{bottom:88px}}
@media(prefers-reduced-motion:reduce){.page-enter,.navigation-progress::after{animation:none}.navigation-progress::after{width:100%}}

/* Password visibility controls on sign-in and registration forms. */
.auth-panel .password-field { position: relative; }
.auth-panel .password-field input { width: 100%; padding-right: 54px; box-sizing: border-box; }
.auth-panel .password-visibility { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.auth-panel .password-visibility[hidden] { display: none; }
.auth-panel .password-visibility:hover { background: rgba(23,100,237,.1); }
.auth-panel .password-visibility:focus-visible { outline: 2px solid #1764ed; outline-offset: -2px; }
.password-visibility .password-eye-slash { display: none; }
.password-visibility[aria-pressed="true"] .password-eye-slash { display: block; }
