/* V5 mobile shell: desktop pages retain their existing layout. */
.mobile-tabs,.mobile-menu,.mobile-connection { display:none; }
.mobile-table-scroll { display:contents; }
.mobile-menu[open] { display:block; }
.mobile-menu { border:0;padding:0;color:var(--ink);background:var(--card); }
.mobile-menu::backdrop { background:rgba(10,25,52,.48);backdrop-filter:blur(3px); }
.mobile-menu-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:24px 22px 18px; }
.mobile-menu-heading small { font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--blue);font-weight:700; }
.mobile-menu-heading h2 { margin:5px 0 0;font-size:23px;letter-spacing:-.04em; }
.mobile-menu-heading button { width:44px;height:44px;flex-shrink:0;border:0;border-radius:50%;background:var(--bg);color:var(--ink);font-size:28px;cursor:pointer; }
.mobile-menu-person { display:flex;align-items:center;gap:12px;margin:0 22px 14px;padding:14px;background:var(--blue-light);border-radius:16px; }
.mobile-menu-person .topbar-user-avatar { width:42px;height:42px;background:var(--blue);color:#fff; }
.mobile-menu-person strong,.mobile-menu-person small { display:block;overflow-wrap:anywhere; }
.mobile-menu-person strong { font-size:14px; }
.mobile-menu-person small { margin-top:4px;font-size:11px;color:var(--muted); }
.mobile-menu-links { padding:0 14px 24px; }
.mobile-menu-links a,.mobile-menu-links .mobile-install { display:flex;align-items:center;gap:13px;min-height:52px;padding:12px;border:0;border-radius:13px;color:var(--ink);font:inherit;font-size:14px;text-decoration:none;width:100%;background:transparent;text-align:left; }
.mobile-menu-links a>span,.mobile-menu-links button>span { flex:1; }
.mobile-menu-links a>.icon:last-child:not(:first-child) { width:15px;color:var(--subtle); }
.mobile-menu-links a[aria-current],.mobile-menu-links a:hover { background:var(--blue-light);color:var(--blue); }
.mobile-menu-links .mobile-logout { color:var(--red);border-top:1px solid var(--border);border-radius:0;margin-top:12px; }
.mobile-menu-links .mobile-install { color:var(--blue);font-weight:600;cursor:pointer; }
.mobile-install[hidden],.mobile-install-help[hidden],.mobile-connection[hidden] { display:none!important; }
.mobile-install-help { margin:2px 12px 12px;font-size:12px;line-height:1.6;color:var(--muted); }
.mobile-login-install { display:block;max-width:370px;margin:14px auto 0;min-height:44px;padding:10px 18px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--blue);font:inherit;font-size:13px;cursor:pointer; }
.mobile-login-install+.mobile-install-help { max-width:370px;margin:10px auto;text-align:center; }
.mobile-connection:not([hidden]) { display:block;position:fixed;left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:120;padding:12px 16px;background:#fff3d6;border:1px solid #e6c772;border-radius:12px;color:#785400;font-size:13px;box-shadow:var(--shadow-md); }
@media screen and (max-width:767px) {
  html { scroll-padding-top:80px; }
  body { padding-bottom:calc(80px + env(safe-area-inset-bottom));-webkit-tap-highlight-color:transparent; }
  body:has(.split-login-shell) { padding-bottom:0;background:#f3f5fa; }
  .topbar-wrap { padding-top:env(safe-area-inset-top);background:var(--blue); }
  .topbar-primary { padding:12px 16px;gap:12px;min-height:72px;box-shadow:none; }
  .topbar-brand { gap:9px;min-width:0;flex-shrink:1; }
  .topbar-brand-mark { width:37px;height:37px; }
  .topbar-brand-name { font-size:20px;letter-spacing:-.04em; }
  .topbar-brand-sub { font-size:8px;letter-spacing:.035em; }
  .topbar-brand-tagline,.topbar-user-info,.topbar-user>.icon { display:none; }
  .topbar-right { gap:10px; }
  .topbar-notification-trigger { width:44px;height:44px; }
  .topbar-user { min-width:44px;min-height:44px;justify-content:center;padding:0; }
  .topbar-user-avatar { width:38px;height:38px; }
  .topbar-user-dropdown { position:absolute;right:12px;max-width:calc(100vw - 24px);max-height:70dvh;overflow-y:auto; }
  .topbar-subnav.grouped-nav { display:none!important; }
  .mobile-tabs { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:80;background:var(--card);border-top:1px solid var(--border);padding:8px max(8px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));box-shadow:0 -4px 22px rgba(20,42,80,.05); }
  .mobile-tabs>a,.mobile-tabs>button { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:52px;padding:4px 0;border:0;border-radius:13px;background:transparent;color:var(--muted);text-decoration:none;font:inherit;font-size:10px;font-weight:600;cursor:pointer; }
  .mobile-tabs [aria-current="page"],.mobile-tabs [aria-expanded="true"] { color:var(--blue);background:var(--blue-light); }
  .mobile-tab-icon { position:relative;display:flex;align-items:center;justify-content:center;height:25px; }
  .mobile-tab-icon>.icon { width:23px;height:23px; }
  .mobile-unread { position:absolute;top:-4px;left:15px;min-width:16px;height:16px;padding:1px 4px;border:2px solid var(--card);border-radius:99px;background:#d92d20;color:#fff;font-size:9px;line-height:10px; }
  .mobile-menu { width:100%;max-width:520px;max-height:calc(92dvh - env(safe-area-inset-top));margin:auto auto 0;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain; }
  body:has(.mobile-menu[open]) { overflow:hidden; }
  .page,.page.page-wide { width:100%;min-width:0;padding:20px 16px 24px!important; }
  .page>* { min-width:0;max-width:100%; }
  .page h1 { font-size:26px;line-height:1.2;overflow-wrap:anywhere; }
  .page h2 { overflow-wrap:anywhere; }
  .page .page-header { flex-wrap:wrap;gap:14px; }
  .page input:not([type=checkbox]):not([type=radio]),.page select,.page textarea,.split-login-shell input { font-size:16px!important;max-width:100%; }
  .page .btn,.page button,.page select,.page input:not([type=checkbox]):not([type=radio]) { min-height:44px; }
  .table-wrap,.table-responsive,.mobile-table-scroll { max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch; }
  .mobile-table-scroll { display:block; }
  .mobile-table-scroll:focus-visible { outline:2px solid var(--blue);outline-offset:3px; }
  .page .pager { flex-wrap:wrap;gap:12px; }
  .page .pager-controls { flex-wrap:wrap; }
  .page .order-search-toolbar { grid-template-columns:minmax(0,1fr); }
  .page .grid-2,.page .grid-3,.page .grid-4 { grid-template-columns:minmax(0,1fr); }
  .my-dash-hero { padding:24px 20px!important;gap:20px!important;flex-direction:column;align-items:stretch!important;grid-template-columns:minmax(0,1fr)!important; }
  .my-dash-hero-copy,.my-dash-hero-overview { width:100%!important;min-width:0!important;max-width:100%!important;flex-basis:auto!important; }
  .my-dash-hero h1 { font-size:28px!important; }
  .my-dash-hero-overview-row { flex-wrap:wrap; }
  .my-dash-services-grid,.my-dash-service-grid,.my-dash-main-grid,.my-dash-bottom-grid { grid-template-columns:minmax(0,1fr)!important; }
  .console-footer { margin-top:16px;padding-bottom:16px; }
  .console-footer-brand { display:none; }
  .split-login-shell { min-height:100dvh;display:flex;flex-direction:column; }
  .split-login-left { min-height:0!important;padding:28px 24px 24px!important;flex:none!important; }
  .split-brand-logos { margin-bottom:16px!important; }
  .split-brand-logos img { max-height:48px; }
  .split-left-content { padding:0!important; }
  .split-left-content h1 { font-size:25px!important;line-height:1.15;margin:12px 0!important; }
  .split-left-text { font-size:13px!important;max-width:360px;line-height:1.6; }
  .split-left-badges { display:none; }
  .split-login-right { width:100%;padding:24px 20px!important;flex:1;align-items:flex-start!important; }
  .split-form-card { max-width:420px;width:100%;padding:0!important; }
  .split-form-card h2 { font-size:25px; }
  .split-form-card .input { min-height:50px; }
  .split-form-card button[type=submit] { min-height:50px;border-radius:13px;font-size:16px; }
  .credential-modal-backdrop { padding:14px; }
  .credential-modal { max-height:85dvh;overflow-y:auto; }
}
@media (prefers-reduced-motion:reduce) { .mobile-tabs *,.mobile-menu * { transition:none!important;scroll-behavior:auto!important; } }
@media print { .mobile-tabs,.mobile-menu,.mobile-connection,.mobile-login-install,.mobile-install-help { display:none!important; } }
