.phone-dock[hidden], .phone-table-hint[hidden] { display:none; }
.phone-dialog { width:min(94vw,32rem); max-height:85dvh; overflow:auto; border:1px solid var(--line); border-radius:18px; padding:1.1rem; color:var(--ink); background:var(--paper, #fff8ed); }
.phone-dialog::backdrop { background:#171021aa; backdrop-filter:blur(3px); }
.phone-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.phone-dialog-heading h2 { margin:0; }
.phone-dialog-heading button { min-width:44px; }
.phone-menu-links { display:grid; gap:8px; }
.phone-dialog section { margin:1.2rem 0; }
.phone-dialog h3 a { display:flex; align-items:center; gap:8px; text-decoration:none; }
.camera-video { width:100%; max-height:45dvh; background:#171717; border-radius:12px; object-fit:contain; }
.camera-code { width:100%; font-size:16px; }
.camera-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.phone-camera-button { margin-top:8px; }
@media screen and (max-width:767px) {
  html { scroll-padding-top:1rem; }
  body.phone-navigation { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
  body.phone-navigation #workspace-navigation, body.phone-navigation #navigation-toggle { display:none !important; }
  .phone-dock { position:fixed; z-index:90; bottom:0; left:0; right:0; display:flex; justify-content:space-around; gap:4px; padding:7px 8px calc(7px + env(safe-area-inset-bottom)); background:var(--paper,#fff8ed); border-top:1px solid var(--line); box-shadow:0 -4px 20px #0002; }
  .phone-dock a,.phone-dock button { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:52px; padding:4px; border:0; border-radius:10px; background:transparent; color:var(--ink); font-family:inherit; font-size:12px; font-weight:600; line-height:1.2; text-decoration:none; box-shadow:none; }
  .phone-dock .nav-icon { width:22px; height:22px; }
  body main, body.layout-refined main { margin-left:0; padding:16px 12px; min-width:0; width:100%; box-sizing:border-box; }
  .page-heading { flex-wrap:wrap; gap:12px; }
  h1 { font-size:clamp(1.55rem,6vw,2rem); overflow-wrap:anywhere; }
  input:not([type=checkbox]):not([type=radio]),select,textarea { font-size:16px; max-width:100%; box-sizing:border-box; }
  button,.button { min-height:44px; white-space:normal; }
  .actions { flex-wrap:wrap; gap:8px; }
  .project-filters,.po-filters,.returns-toolbar,.demo-toolbar,.mac-toolbar,.transfer-options { display:flex; flex-wrap:wrap; gap:10px; }
  .project-filters > *, .po-filters > *, .transfer-options > * { min-width:0; max-width:100%; }
  .table-wrap { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:auto; }
  .phone-table-hint { display:block; margin:8px 0; font-weight:600; color:var(--muted); }
  .table-wrap::-webkit-scrollbar { height:9px; }
  .table-wrap::-webkit-scrollbar-thumb { background:#94765b; border-radius:8px; }
  #scan-form,#intake-scan { display:flex; flex-wrap:wrap; align-items:end; gap:8px; }
  #scan-form input,#intake-code { width:100%; min-width:0; }
  #scan-form > label,#intake-scan > label { flex:1 1 100%; }
  .phone-camera-button { flex:1 1 100%; }
  .administration-layout { grid-template-columns:1fr; }
  .administration-sidebar { position:static; max-height:180px; overflow:auto; }
  .phone-dialog .button { text-align:center; }
}

@media screen and (max-width:767px) {
  .theme-refined.has-navigation { display:block; }
  .theme-refined.has-navigation main { padding:16px 12px; }
  .phone-navigation .app-header { padding:10px 12px; gap:10px; }
  .phone-navigation .header-search { flex-basis:100%; }
  .phone-navigation .header-search input[type=search] { font-size:16px; }
  .phone-cards-ready,.phone-cards-ready tbody { display:block; width:100%; min-width:0; }
  .phone-cards-ready thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .phone-cards-ready tbody tr { display:block; padding:12px; margin-bottom:10px; border:1px solid var(--line); border-radius:12px; }
  .phone-cards-ready tbody td,.phone-cards-ready tbody th { display:block; width:auto; min-width:0; padding:7px 0; border:0; white-space:normal; overflow-wrap:anywhere; }
  .phone-cards-ready tbody td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:.75rem; font-weight:650; margin-bottom:3px; }
  .phone-cards-ready tbody th a { display:inline-block; padding:8px 12px; border:1px solid var(--line); border-radius:8px; text-decoration:none; font-weight:700; }
  #scan-form .scan-entry { width:100%; min-width:0; display:flex; gap:8px; }
  #scan-form .scan-entry input { flex:1; width:0; }
}
@media print { .phone-dock,.phone-table-hint,.phone-camera-button,.phone-dialog { display:none !important; } }
