.mobile-admin-shell {
  display: none;
}

@media (max-width: 820px) {
  body.mobile-admin-ready {
    background: #0b1220;
    color: #0f172a;
    overflow: hidden;
  }

  body.mobile-admin-ready #appLayout {
    display: block !important;
    width: 100vw;
    height: 100dvh;
    background: #0b1220;
  }

  body.mobile-admin-ready #appLayout > .w-48 {
    display: none !important;
  }

  body.mobile-admin-ready #appLayout > .flex-1 {
    position: fixed;
    inset: 72px 0 74px 0;
    display: none;
    width: 100vw;
    height: auto;
    padding: 0;
    overflow: hidden;
    background: #eef2f7;
    z-index: 41;
  }

  body.mobile-admin-ready.mobile-section-open #appLayout > .flex-1 {
    display: flex;
  }

  body.mobile-admin-ready .mobile-admin-shell {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(circle at 15% 0%, rgba(249, 115, 22, .22), transparent 32%),
      linear-gradient(180deg, #0b1220 0%, #111827 42%, #e8edf4 42%, #eef2f7 100%);
    font-family: Inter, Arial, "Segoe UI", sans-serif;
  }

  body.mobile-admin-ready .mobile-admin-top {
    height: 72px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    background: rgba(11, 18, 32, .92);
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    backdrop-filter: blur(18px);
  }

  body.mobile-admin-ready .mobile-back-btn {
    display: none;
  }

  body.mobile-admin-ready.mobile-section-open .mobile-back-btn {
    display: inline-flex;
  }

  .mobile-admin-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .mobile-admin-brand img {
    width: 106px;
    height: 34px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .22));
  }

  .mobile-admin-brand div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.05;
  }

  .mobile-admin-brand span {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
    color: #fb923c;
  }

  .mobile-admin-brand strong {
    max-width: 112px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  }

  .mobile-icon-btn:active,
  .mobile-admin-tabbar button:active,
  .mobile-action-grid button:active,
  .mobile-more-grid button:active {
    transform: translateY(1px) scale(.99);
  }

  .mobile-admin-home {
    flex: 1;
    min-height: 0;
    padding: 14px 14px 92px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-admin-ready.mobile-section-open .mobile-admin-home {
    display: none;
  }

  .mobile-hero-panel {
    min-height: 118px;
    padding: 18px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    background:
      linear-gradient(135deg, rgba(249, 115, 22, .94), rgba(234, 88, 12, .82)),
      #f97316;
    color: #fff;
    box-shadow: 0 20px 42px rgba(124, 45, 18, .28);
  }

  .mobile-hero-panel p {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .86;
  }

  .mobile-hero-panel h1 {
    margin: 0;
    max-width: 245px;
    font-size: 27px;
    line-height: .98;
    font-weight: 950;
    letter-spacing: 0;
  }

  .mobile-refresh-btn {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
  }

  .mobile-kpi-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-kpi-card {
    min-height: 88px;
    padding: 10px 8px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    color: #0f172a;
    text-align: left;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .1);
  }

  .mobile-kpi-card span,
  .mobile-kpi-card small {
    display: block;
    font-size: 9px;
    line-height: 1.1;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .mobile-kpi-card strong {
    display: block;
    margin: 7px 0 5px;
    color: #0f172a;
    font-size: clamp(19px, 7vw, 28px);
    line-height: .9;
    font-weight: 950;
  }

  .mobile-kpi-card.accent-amber strong { color: #b45309; }
  .mobile-kpi-card.accent-emerald strong { color: #047857; }
  .mobile-kpi-card.accent-rose strong { color: #be123c; }

  .mobile-search-panel {
    margin-top: 12px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #dbe3ec;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  }

  .mobile-search-panel i {
    color: #f97316;
  }

  .mobile-search-panel input {
    min-width: 0;
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    background: transparent;
  }

  .mobile-action-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-action-grid button {
    min-height: 82px;
    padding: 10px 6px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  }

  .mobile-action-grid i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: #0f172a;
    color: #fb923c;
    font-size: 14px;
  }

  .mobile-action-grid span {
    display: block;
    font-size: 10px;
    line-height: 1.05;
    font-weight: 950;
    overflow-wrap: anywhere;
  }

  .mobile-live-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dbe3ec;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
  }

  .mobile-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-section-title span {
    display: block;
    font-size: 9px;
    color: #f97316;
    font-weight: 950;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  .mobile-section-title strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    color: #0f172a;
    font-weight: 950;
  }

  .mobile-section-title button {
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 8px 11px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 10px;
    font-weight: 950;
  }

  .mobile-job-list {
    display: grid;
    gap: 9px;
  }

  .mobile-job-card,
  .mobile-empty-card {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 12px;
  }

  .mobile-job-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .mobile-job-main {
    min-width: 0;
  }

  .mobile-job-main strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-job-main span,
  .mobile-job-main small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
  }

  .mobile-job-plate {
    display: inline-flex;
    margin-top: 7px;
    padding: 5px 8px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
  }

  .mobile-job-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .mobile-status-chip {
    max-width: 116px;
    padding: 5px 8px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #075985;
    font-size: 9px;
    line-height: 1.05;
    font-weight: 950;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .mobile-mini-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
  }

  .mobile-empty-card {
    color: #64748b;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-admin-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 65;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 7px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .94);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 22px 50px rgba(2, 6, 23, .38);
    backdrop-filter: blur(18px);
  }

  .mobile-admin-tabbar button {
    min-width: 0;
    border: 0;
    border-radius: 8px;
    color: #cbd5e1;
    background: transparent;
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-admin-tabbar i {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
  }

  .mobile-admin-tabbar button.active {
    color: #fff;
    background: #ea580c;
  }

  .mobile-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
  }

  .mobile-sheet-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 23, .58);
  }

  .mobile-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 76dvh;
    padding: 10px 14px max(90px, calc(env(safe-area-inset-bottom) + 88px));
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
    box-shadow: 0 -24px 56px rgba(2, 6, 23, .3);
  }

  .mobile-sheet-grip {
    width: 42px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 8px;
    background: #cbd5e1;
  }

  .mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-more-grid button {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 950;
    text-align: left;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
  }

  .mobile-more-grid i {
    width: 26px;
    color: #ea580c;
    text-align: center;
  }

  body.mobile-admin-ready .section.active {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-admin-ready .desktop-header-main {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 12px;
    text-align: left;
  }

  body.mobile-admin-ready .desktop-panel {
    margin: 0;
    border-radius: 0;
  }

  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px !important;
    margin: 0 0 10px !important;
    background: #f8fafc !important;
    border: 0 !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }

  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center > label,
  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center > #txtSearch {
    grid-column: 1 / -1;
  }

  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center > label {
    display: block;
    color: #0f172a !important;
    font-size: 12px !important;
    line-height: 1.2;
    margin: 0;
  }

  body.mobile-admin-ready #registration #txtSearch {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  }

  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center > button {
    width: 100% !important;
    min-height: 44px !important;
    padding: 9px 8px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  body.mobile-admin-ready #registration .desktop-panel > .flex.gap-2.items-center > .border-l {
    display: none !important;
  }

  body.mobile-admin-ready #registration .desktop-panel {
    padding: 0 !important;
    background: #eef2f7 !important;
  }

  body.mobile-admin-ready #registration .desktop-panel > .grid {
    padding: 10px !important;
    gap: 10px !important;
  }

  body.mobile-admin-ready #registration .desktop-panel > .grid > div {
    border-radius: 8px;
    overflow: hidden;
  }

  body.mobile-admin-ready #dashboard .desktop-header-main {
    align-items: stretch !important;
    gap: 8px !important;
  }

  body.mobile-admin-ready #dashboard .desktop-header-main > div {
    width: 100%;
    justify-content: stretch;
  }

  body.mobile-admin-ready #dashboard #dashFilterStato {
    width: 100% !important;
    height: 42px !important;
  }

  body.mobile-admin-ready input,
  body.mobile-admin-ready select,
  body.mobile-admin-ready textarea {
    font-size: 16px !important;
  }

  body.mobile-admin-ready .desktop-btn {
    min-height: 36px;
  }

  body.mobile-admin-ready .support-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-admin-ready .support-side {
    max-height: 250px;
  }
}
