:root {
  --mobile-command-bar-height: 72px;
  --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-touch-target: 46px;
  --tablet-content-max: 1180px;
}

.mobile-command-bar,
.mobile-sheet,
.mobile-sheet-backdrop {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  button,
  .btn,
  [role="button"],
  .form-check-input,
  .nav-link,
  .dropdown-item,
  summary {
    touch-action: manipulation;
  }
}

@media (max-width: 1199.98px) {
  body.has-app-shell .content {
    width: 100%;
    max-width: var(--tablet-content-max);
    margin-inline: auto;
  }

  body.has-app-shell .sticky-top:not(.navbar),
  body.has-app-shell [class*="sidebar"][style*="sticky"],
  body.has-app-shell .maintenance-sidebar,
  body.has-app-shell .saas-sidebar,
  body.has-app-shell .invoice-sidebar {
    position: static !important;
    top: auto !important;
  }

  body.has-app-shell .row.g-4 > .col-xl-8,
  body.has-app-shell .row.g-4 > .col-xl-4,
  body.has-app-shell .row.g-3 > .col-xl-8,
  body.has-app-shell .row.g-3 > .col-xl-4 {
    min-width: 0;
  }

  body.has-app-shell iframe,
  body.has-app-shell embed,
  body.has-app-shell object,
  body.has-app-shell canvas,
  body.has-app-shell video {
    max-width: 100%;
  }

  body.has-app-shell .table-responsive {
    border-radius: 0.9rem;
    border: 1px solid rgba(var(--border-rgb), 0.68);
    background: var(--card-surface);
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable both-edges;
  }

  body.has-app-shell .table-responsive::after {
    content: '';
    position: sticky;
    right: 0;
    display: block;
    width: 1px;
    height: 1px;
  }

  body.has-app-shell .modal-dialog {
    max-width: min(94vw, 760px);
    margin: 1.25rem auto;
  }

  body.has-app-shell .offcanvas,
  body.has-app-shell .dropdown-menu {
    max-width: calc(100vw - 1rem);
  }

  body.has-app-shell .dropdown-menu {
    max-height: min(70vh, 34rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.has-app-shell .card-header,
  body.has-app-shell .modal-header,
  body.has-app-shell .modal-footer {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  body.has-app-shell .card-header > .d-flex,
  body.has-app-shell .page-header > .d-flex,
  body.has-app-shell .workspace-header > .d-flex {
    min-width: 0;
    flex-wrap: wrap;
  }
}

@media (max-width: 1199.98px) {
  html {
    scroll-padding-top: calc(var(--mobile-navbar-height) + 0.75rem);
  }

  body.has-app-shell {
    padding-bottom: 0;
  }

  body.has-app-shell.mobile-sheet-open {
    overflow: hidden;
    touch-action: none;
  }

  body.has-app-shell .navbar.sticky-top {
    top: env(safe-area-inset-top, 0px);
    min-height: 58px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  body.has-app-shell .navbar .container-fluid > .ms-auto {
    flex-wrap: nowrap;
    max-width: none;
  }

  body.has-app-shell .navbar .app-shell-icon-btn {
    width: var(--mobile-touch-target) !important;
    height: var(--mobile-touch-target) !important;
    min-width: var(--mobile-touch-target);
    min-height: var(--mobile-touch-target);
    padding: 0 !important;
    border-radius: 0.9rem;
  }

  body.has-app-shell .nav-mobile-meta {
    display: none !important;
  }

  body.has-app-shell .content {
    padding: 1rem;
    padding-bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 1.5rem);
    overflow-x: clip;
  }

  body.has-app-shell .content > :first-child {
    scroll-margin-top: calc(var(--mobile-navbar-height) + 0.75rem);
  }

  body.has-app-shell .sidebar {
    padding-bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 1rem) !important;
  }

  body.has-app-shell .page-title,
  body.has-app-shell h1 {
    overflow-wrap: anywhere;
  }

  body.has-app-shell .modern-card,
  body.has-app-shell .card,
  body.has-app-shell .brand-panel,
  body.has-app-shell .app-panel {
    min-width: 0;
  }

  body.has-app-shell .card-body,
  body.has-app-shell .modern-card,
  body.has-app-shell .brand-panel,
  body.has-app-shell .app-panel {
    overflow-wrap: anywhere;
  }

  body.has-app-shell .btn,
  body.has-app-shell button:not(.accordion-button):not(.nav-link),
  body.has-app-shell input[type="button"],
  body.has-app-shell input[type="submit"],
  body.has-app-shell input[type="reset"] {
    min-height: var(--mobile-touch-target);
  }

  body.has-app-shell .btn-sm,
  body.has-app-shell .btn-group-sm > .btn {
    min-height: 42px;
    padding: 0.58rem 0.78rem;
  }

  body.has-app-shell a.btn,
  body.has-app-shell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
  }

  body.has-app-shell .form-control,
  body.has-app-shell .form-select,
  body.has-app-shell .input-group-text {
    min-height: 48px;
    font-size: 16px;
    border-radius: 0.82rem;
  }

  body.has-app-shell .input-group > .form-control,
  body.has-app-shell .input-group > .form-select,
  body.has-app-shell .input-group > .btn,
  body.has-app-shell .input-group > .input-group-text {
    border-radius: 0;
  }

  body.has-app-shell .input-group > :first-child {
    border-top-left-radius: 0.82rem;
    border-bottom-left-radius: 0.82rem;
  }

  body.has-app-shell .input-group > :last-child {
    border-top-right-radius: 0.82rem;
    border-bottom-right-radius: 0.82rem;
  }

  body.has-app-shell textarea.form-control {
    min-height: 8rem;
  }

  body.has-app-shell input[type="date"],
  body.has-app-shell input[type="datetime-local"],
  body.has-app-shell input[type="time"],
  body.has-app-shell input[type="month"],
  body.has-app-shell input[type="number"] {
    font-variant-numeric: tabular-nums;
  }

  body.has-app-shell .form-check {
    min-height: 2.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  body.has-app-shell .form-check-input {
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
    margin-top: 0.16rem;
  }

  body.has-app-shell .form-check-label {
    min-height: 1.7rem;
    line-height: 1.4;
    padding-top: 0.04rem;
  }

  body.has-app-shell .form-label,
  body.has-app-shell legend {
    font-weight: 650;
  }

  body.has-app-shell .app-mobile-form-stack .row > [class*="col-"] {
    min-width: 0;
  }

  body.has-app-shell .app-mobile-form-stack .row > .col-6,
  body.has-app-shell .app-mobile-form-stack .row > .col-4,
  body.has-app-shell .app-mobile-form-stack .row > .col-3,
  body.has-app-shell .app-mobile-form-stack .row > .col-2 {
    width: 50%;
  }

  body.has-app-shell .app-action-row,
  body.has-app-shell .page-actions,
  body.has-app-shell .form-actions,
  body.has-app-shell [data-mobile-action-source] {
    gap: 0.65rem !important;
  }

  body.has-app-shell .app-action-row > *,
  body.has-app-shell .page-actions > *,
  body.has-app-shell .form-actions > * {
    min-width: 0;
  }

  body.has-app-shell .btn-group,
  body.has-app-shell .d-inline-flex.btn-group,
  body.has-app-shell .button-group {
    flex-wrap: wrap;
  }

  body.has-app-shell .pagination {
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  body.has-app-shell .pagination .page-link {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.has-app-shell .nav-tabs,
  body.has-app-shell .nav-pills {
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 0.75rem;
  }

  body.has-app-shell .nav-tabs .nav-link,
  body.has-app-shell .nav-pills .nav-link {
    min-height: 44px;
  }

  body.has-app-shell details > summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    cursor: pointer;
  }

  body.has-app-shell .accordion-button {
    min-height: 52px;
    padding: 0.85rem 1rem;
  }

  body.has-app-shell .table-responsive {
    margin-inline: -0.15rem;
    padding-bottom: 0.15rem;
  }

  body.has-app-shell .table {
    margin-bottom: 0;
  }

  body.has-app-shell .table th,
  body.has-app-shell .table td {
    vertical-align: middle;
  }

  body.has-app-shell .mobile-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.45rem;
    color: var(--text-muted);
    font-size: 0.76rem;
  }

  body.has-app-shell .mobile-scroll-hint::before {
    content: '\2194';
    font-size: 1rem;
  }

  body.has-app-shell .modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.has-app-shell .modal-dialog {
    width: calc(100% - 1rem);
    max-width: none;
    margin: 0.5rem auto;
  }

  body.has-app-shell .modal-content {
    max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 1.1rem;
    overflow: hidden;
  }

  body.has-app-shell .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.has-app-shell .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--card-surface);
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  body.has-app-shell .toast-container {
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 0.75rem) !important;
    width: auto !important;
  }

  body.has-app-shell .toast {
    width: 100%;
    max-width: none;
  }

  body.has-app-shell .alert,
  body.has-app-shell .access-state-banner {
    border-radius: 0.9rem;
  }

  body.has-app-shell .access-state-banner {
    flex-direction: column;
    align-items: stretch;
  }

  body.has-app-shell .access-state-banner__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.has-app-shell .access-state-banner__actions .btn {
    width: 100%;
  }

  .mobile-command-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1088;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom));
    padding: 0.42rem 0.4rem calc(0.42rem + var(--mobile-safe-bottom));
    border-top: 1px solid rgba(var(--border-rgb), 0.78);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.13);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .mobile-command-bar__item {
    min-width: 0;
    min-height: 56px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    text-decoration: none;
    font: inherit;
  }

  .mobile-command-bar__item:hover,
  .mobile-command-bar__item:focus-visible,
  .mobile-command-bar__item.is-active {
    color: var(--text);
    background: var(--brand-surface-soft);
  }

  .mobile-command-bar__item--primary {
    transform: translateY(-0.5rem);
    min-height: 64px;
    border-radius: 1.15rem;
    color: #fff;
    background: var(--brand-button-gradient);
    border: 1px solid var(--brand-button-border);
    box-shadow: 0 12px 26px rgba(22, 157, 255, 0.25);
  }

  .mobile-command-bar__item--primary:hover,
  .mobile-command-bar__item--primary:focus-visible {
    color: #fff;
    background: var(--brand-button-gradient-hover);
  }

  .mobile-command-bar__icon {
    font-size: 1.25rem;
    line-height: 1;
  }

  .mobile-command-bar__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 720;
  }

  .mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: block;
    background: rgba(2, 9, 23, 0.58);
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .mobile-sheet-backdrop.is-visible {
    opacity: 1;
  }

  .mobile-sheet {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 0.35rem);
    z-index: 1095;
    display: flex;
    flex-direction: column;
    max-height: min(76dvh, 720px);
    border: 1px solid rgba(var(--border-rgb), 0.82);
    border-radius: 1.25rem;
    background: var(--card-surface);
    color: var(--text);
    box-shadow: 0 24px 60px rgba(2, 9, 23, 0.38);
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.18s ease;
    overflow: hidden;
  }

  .mobile-sheet.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-sheet__handle {
    width: 2.8rem;
    height: 0.28rem;
    margin: 0.5rem auto 0;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.42);
  }

  .mobile-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(var(--border-rgb), 0.7);
  }

  .mobile-sheet__eyebrow {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-sheet__title {
    margin: 0.12rem 0 0;
    font-size: 1.12rem;
    line-height: 1.2;
  }

  .mobile-sheet__close {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border: 1px solid rgba(var(--border-rgb), 0.72);
    border-radius: 0.9rem;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.55rem;
    line-height: 1;
  }

  .mobile-sheet__body {
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-quick-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .mobile-quick-create-card {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem;
    border: 1px solid rgba(var(--border-rgb), 0.72);
    border-radius: 1rem;
    background: var(--brand-surface-soft);
    color: var(--text);
    text-decoration: none;
    text-align: center;
  }

  .mobile-quick-create-card:hover,
  .mobile-quick-create-card:focus-visible {
    color: var(--text);
    border-color: var(--brand-border-soft);
    background: var(--brand-surface-soft-strong);
  }

  .mobile-quick-create-card__icon {
    font-size: 1.55rem;
    line-height: 1;
  }

  .mobile-quick-create-card__label {
    font-size: 0.88rem;
    font-weight: 750;
  }

  .mobile-search-form .input-group {
    flex-wrap: nowrap;
  }

  .mobile-page-tools {
    display: grid;
    gap: 1rem;
  }

  .mobile-page-tools__section[hidden] {
    display: none !important;
  }

  .mobile-page-tools__heading {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 780;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .mobile-page-actions,
  .mobile-page-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .mobile-page-action,
  .mobile-page-section-link {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(var(--border-rgb), 0.72);
    border-radius: 0.9rem;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-weight: 650;
  }

  .mobile-page-action--primary {
    background: var(--brand-button-gradient);
    border-color: var(--brand-button-border);
    color: #fff;
  }

  .mobile-page-action--danger {
    border-color: rgba(190, 18, 60, 0.28);
    background: rgba(190, 18, 60, 0.09);
    color: var(--danger);
  }

  .mobile-page-action__arrow,
  .mobile-page-section-link__arrow {
    flex: 0 0 auto;
    font-size: 1rem;
  }

  .mobile-page-tools-empty {
    padding: 0.85rem;
    border: 1px dashed rgba(var(--border-rgb), 0.85);
    border-radius: 0.9rem;
    color: var(--text-muted);
    font-size: 0.85rem;
  }

  .mobile-field-error-summary {
    position: sticky;
    top: calc(var(--mobile-navbar-height) + 0.5rem);
    z-index: 25;
    margin-bottom: 0.75rem;
    border-radius: 0.9rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --mobile-command-bar-height: 70px;
  }

  body.has-app-shell .content {
    padding: 0.75rem;
    padding-bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 1.25rem);
  }

  body.has-app-shell .navbar-brand-logo {
    max-width: 37vw;
  }

  body.has-app-shell .navbar .container-fluid > .ms-auto {
    gap: 0.25rem !important;
  }


  body.has-app-shell .page-title,
  body.has-app-shell h1 {
    font-size: clamp(1.28rem, 6vw, 1.65rem);
  }

  body.has-app-shell h2 {
    font-size: clamp(1.08rem, 5vw, 1.35rem);
  }

  body.has-app-shell .modern-card,
  body.has-app-shell .card,
  body.has-app-shell .brand-panel,
  body.has-app-shell .app-panel {
    border-radius: 0.9rem;
  }

  body.has-app-shell .card-body,
  body.has-app-shell .card-header,
  body.has-app-shell .card-footer,
  body.has-app-shell .modern-card,
  body.has-app-shell .brand-panel,
  body.has-app-shell .app-panel {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  body.has-app-shell .app-mobile-form-stack .row > [class*="col-"]:not(.mobile-keep-half):not(.mobile-keep-third) {
    width: 100%;
  }

  body.has-app-shell .app-mobile-form-stack .row > .mobile-keep-half {
    width: 50%;
  }

  body.has-app-shell .app-mobile-form-stack .row > .mobile-keep-third {
    width: 33.333333%;
  }

  body.has-app-shell .app-action-row,
  body.has-app-shell .page-actions,
  body.has-app-shell .form-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.has-app-shell .app-action-row > *,
  body.has-app-shell .page-actions > *,
  body.has-app-shell .form-actions > *,
  body.has-app-shell .app-action-row .btn,
  body.has-app-shell .page-actions .btn,
  body.has-app-shell .form-actions .btn {
    width: 100%;
  }

  body.has-app-shell .btn-group:not(.mobile-keep-inline) {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  body.has-app-shell .btn-group:not(.mobile-keep-inline) > .btn {
    width: 100%;
    border-radius: 0.78rem !important;
  }

  body.has-app-shell .table-mobile-smart {
    display: block;
    width: 100%;
  }

  body.has-app-shell .table-mobile-smart thead {
    display: none;
  }

  body.has-app-shell .table-mobile-smart tbody,
  body.has-app-shell .table-mobile-smart tr,
  body.has-app-shell .table-mobile-smart td {
    display: block;
    width: 100%;
  }

  body.has-app-shell .table-mobile-smart tbody {
    padding: 0.4rem;
  }

  body.has-app-shell .table-mobile-smart tbody tr {
    position: relative;
    margin: 0 0 0.65rem;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(var(--border-rgb), 0.72);
    border-radius: 0.9rem;
    background: var(--card-surface);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  }

  body.has-app-shell .table-mobile-smart tbody tr:last-child {
    margin-bottom: 0;
  }

  body.has-app-shell .table-mobile-smart tbody td {
    min-height: 2.3rem;
    padding: 0.4rem 0;
    border: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.has-app-shell .table-mobile-smart tbody td:not([data-label=""]):not(.mobile-no-label) {
    display: grid;
    grid-template-columns: minmax(6.5rem, 42%) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
  }

  body.has-app-shell .table-mobile-smart tbody td:not([data-label=""]):not(.mobile-no-label)::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.025em;
    text-transform: uppercase;
  }

  body.has-app-shell .table-mobile-smart tbody td[data-mobile-primary="1"] {
    display: block;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(var(--border-rgb), 0.6) !important;
    font-size: 1rem;
    font-weight: 720;
  }

  body.has-app-shell .table-mobile-smart tbody td[data-mobile-actions="1"] {
    display: block;
    padding-top: 0.65rem;
  }

  body.has-app-shell .table-mobile-smart tbody td[data-mobile-actions="1"] .btn,
  body.has-app-shell .table-mobile-smart tbody td[data-mobile-actions="1"] a.btn,
  body.has-app-shell .table-mobile-smart tbody td[data-mobile-actions="1"] button {
    min-height: 42px;
  }

  body.has-app-shell .table-mobile-smart tbody td[colspan] {
    display: block !important;
  }

  body.has-app-shell .table-mobile-smart tbody td[colspan]::before {
    content: none !important;
  }

  body.has-app-shell .table-mobile-smart .dropdown-menu {
    position: fixed !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 0.5rem) !important;
    top: auto !important;
    transform: none !important;
    width: auto;
    max-height: 60dvh;
    border-radius: 1rem;
  }

  body.has-app-shell .access-state-banner__actions {
    grid-template-columns: 1fr;
  }

  .mobile-sheet {
    left: 0.35rem;
    right: 0.35rem;
    bottom: calc(var(--mobile-command-bar-height) + var(--mobile-safe-bottom) + 0.25rem);
    max-height: 78dvh;
  }
}

@media (max-width: 479.98px) {
  body.has-app-shell .navbar-brand-logo {
    max-width: 34vw;
  }

  body.has-app-shell .navbar .app-shell-icon-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
  }

  .mobile-command-bar {
    padding-inline: 0.18rem;
  }

  .mobile-command-bar__item {
    min-height: 54px;
    padding-inline: 0.1rem;
  }

  .mobile-command-bar__label {
    font-size: 0.63rem;
  }

  .mobile-quick-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body.has-app-shell .table-mobile-smart tbody td:not([data-label=""]):not(.mobile-no-label) {
    grid-template-columns: 1fr;
    gap: 0.16rem;
  }
}

@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 560px) {
  :root {
    --mobile-command-bar-height: 58px;
  }

  .mobile-command-bar__item {
    min-height: 46px;
    flex-direction: row;
    gap: 0.25rem;
  }

  .mobile-command-bar__item--primary {
    min-height: 52px;
    transform: translateY(-0.2rem);
  }

  .mobile-sheet {
    max-height: calc(100dvh - var(--mobile-command-bar-height) - 0.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-command-bar__item,
  .mobile-sheet,
  .mobile-sheet-backdrop,
  body.has-app-shell .btn,
  body.has-app-shell .card,
  body.has-app-shell .modern-card {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1199.98px) {
  body.mobile-keyboard-open {
    padding-bottom: 0;
  }

  body.mobile-keyboard-open .mobile-command-bar {
    transform: translateY(120%);
    pointer-events: none;
  }

  body.mobile-keyboard-open .mobile-sheet {
    bottom: 0.25rem;
    max-height: calc(var(--mobile-visual-height, 70dvh) - 0.5rem);
  }
}

.app-invoice-summary {
  width: min(100%, 34rem);
  display: grid;
  gap: 0.45rem;
}

@media (max-width: 767.98px) {
  .app-invoice-summary {
    width: 100%;
  }
}

@media print {
  .mobile-command-bar,
  .mobile-sheet,
  .mobile-sheet-backdrop,
  .mobile-scroll-hint {
    display: none !important;
  }

  body.has-app-shell .content {
    padding-bottom: 0 !important;
  }
}
