/* Local Lucide glyphs retain their original dimensions on wide screens. */
/* The app home uses grouped navigation; field controls keep their own workflow. */
#dls-home-view{max-width:720px}
#dls-home-view h1{font-size:23px;line-height:1.4;margin:24px 4px 16px;letter-spacing:0}
#dls-home-view h2{font-size:13px;line-height:1.5;font-weight:500;color:var(--muted);margin:22px 14px 8px;letter-spacing:0}
#dls-home-profile{display:flex;align-items:center;gap:14px;width:100%;min-height:112px;padding:20px;border:1px solid color-mix(in srgb,var(--line) 35%,transparent);border-radius:24px;background:var(--surface);color:var(--fg);font:inherit;text-align:left;box-shadow:0 2px 12px #00000004;cursor:pointer}
.dls-profile-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
.dls-profile-copy strong{font-size:19px;font-weight:600;line-height:1.4}
.dls-profile-copy>span{font-size:14px;color:var(--muted)}
.dls-profile-copy small{font-size:13px;color:var(--blue)}
#dls-home-avatar{display:grid;place-items:center;flex:0 0 56px;width:56px;height:56px;border-radius:50%;overflow:hidden;background:var(--bg)}
#dls-home-avatar img{width:100%;height:100%;object-fit:cover}
.dls-home-chevron{width:18px;height:18px;flex:none;background:var(--muted);mask:url('/app/icons/chevron-right.svg') center/contain no-repeat}
#dls-home-view .dls-work-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
#dls-home-view .dls-work-grid button{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;min-height:60px;min-width:0;padding:12px 16px;border:0;border-radius:0;background:var(--surface);color:var(--fg);box-shadow:none;font:400 15px/1.5 var(--font);text-align:left}
#dls-home-view .dls-work-grid button:not(.dls-first)::before{content:"";position:absolute;top:0;left:62px;right:16px;height:1px;background:var(--line);opacity:.65}
#dls-home-view .dls-work-grid button::after{content:"";width:16px;height:16px;flex:none;margin-left:auto;background:var(--muted);mask:url('/app/icons/chevron-right.svg') center/contain no-repeat}
#dls-home-view .dls-work-grid .dls-first{border-radius:20px 20px 0 0}
#dls-home-view .dls-work-grid .dls-last{border-radius:0 0 20px 20px}
#dls-home-view .dls-work-grid .dls-first.dls-last{border-radius:20px}
#dls-home-view .dls-ui-label{flex:1;min-width:0;overflow-wrap:anywhere}
#dls-home-view .dls-ui-icon{--icon-tile:#176ac2;flex:0 0 32px;width:32px;height:32px;border-radius:8px;color:#fff;background:linear-gradient(155deg,#ffffff30,#ffffff00),var(--icon-tile);box-shadow:inset 0 1px 0 #ffffff70,0 2px 4px #00000012}
#dls-home-view .dls-ui-glyph{width:21px;height:21px}
#dls-home-view .dls-i-team{--icon-tile:#16815c}
#dls-home-view .dls-i-price{--icon-tile:#b45029}
#dls-home-view .dls-i-out{--icon-tile:#b63347}
#dls-home-view [data-work-tab=tracking] .dls-ui-icon{--icon-tile:#b95700}
#dls-home-view [data-work-tab=expenses] .dls-ui-icon{--icon-tile:#9b28b5}
#dls-home-view [data-work-tab=boq] .dls-ui-icon{--icon-tile:#006e86}
#dls-home-view [data-work-tab=chat] .dls-ui-icon{--icon-tile:#147d52}
#dls-home-view [data-work-tab=leads] .dls-ui-icon{--icon-tile:#c03656}
#dls-home-view [data-work-tab=text] .dls-ui-icon{--icon-tile:#716242}
#dls-home-view [data-work-tab=home] .dls-ui-icon,#dls-home-view [data-home-action=trash] .dls-ui-icon{--icon-tile:#626268}
#dls-home-view [data-home-action=out]{color:#b63347}
#dls-workspace{visibility:visible}
.dls-worker-home #dls-workspace{position:static;overflow:visible;padding:16px 0 0;max-width:100%;margin:0}
.dls-worker-home #dls-home-view{max-width:none}
.dls-worker-home #dls-home-view [data-home-group]{display:none}
.dls-worker-home #dls-home-view h1{margin-bottom:0}
.dls-worker-home #a-open>.admbar,.dls-worker-home #bo-tabs{display:none}
.dls-worker-home #fd-root .fd-intro{display:none}
.dls-worker-home #fd-root{padding-top:12px}
.dls-worker-home #p-admin>.wrap{padding-top:0}
.dls-app #p-profile{max-width:760px;margin:0 auto;padding:16px}
.dls-app #p-profile .pagehead{padding-top:16px}
@media(max-width:360px){#dls-home-profile{gap:10px;padding:16px}.dls-profile-copy strong{font-size:17px}#dls-home-view .dls-work-grid button{padding-inline:12px}}
@media(prefers-reduced-motion:no-preference){#dls-home-profile{transition:background-color .15s ease}#dls-home-profile:active{background:color-mix(in srgb,var(--surface) 90%,var(--blue))}}
.dls-ui-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 auto;color:var(--gold)}
.dls-ui-glyph{display:block;width:100%;height:100%;background:currentColor;mask-position:center;mask-size:contain;mask-repeat:no-repeat}
#dls-app-header a{display:flex;align-items:center;gap:8px}
#dls-app-header a img{display:block;object-fit:contain;flex:none}
#dls-app-nav .dls-ui-icon{width:26px;height:26px;color:inherit}
#dls-scan-now .dls-ui-icon{width:80px;height:80px}
.fd-icon-tile{display:inline-flex;align-items:center;justify-content:center;flex:none}
.fd-purchase>.fd-icon-tile{color:#af30bf}
.fd-purchase>.fd-icon-tile .fd-icon{width:36px;height:36px}
#fd-root[hidden]{display:none!important}

@media screen and (max-width:899px){
  html body{--font:-apple-system,BlinkMacSystemFont,"Thonburi","Noto Sans Thai",sans-serif;font-family:var(--font);font-size:16px;font-weight:400;letter-spacing:0;line-height:1.6}
  :root.dls-app,:root.dls-app.dls-tracking,:root.dls-app[data-theme=light],:root.dls-app.dls-tracking[data-theme=light]{--bg:#f2f2f7;--surface:#fff;--fg:#1c1c1e;--muted:#626268;--line:#d5d5dc;--faint:#8b8b93;--gold:#a34e00;--goldtext:#a34e00;--blue:#176ac2;--green:#147d52;--on-blue:#fff;--on-green:#fff;--ui-glass:rgba(250,250,252,.9);--ui-shadow:0 3px 14px #0000000a;--ui-inset:inset 0 1px 0 #ffffffb3;color-scheme:light}
  :root.dls-app[data-theme=dark],:root.dls-app.dls-tracking[data-theme=dark]{--bg:#080809;--surface:#1c1c1e;--fg:#f5f5f7;--muted:#b0b0b8;--line:#3b3b40;--faint:#8d8d96;--gold:#ffc177;--goldtext:#ffc177;--blue:#82baff;--green:#86d9b6;--on-blue:#121214;--on-green:#121214;--ui-glass:rgba(28,28,30,.92);--ui-shadow:0 3px 14px #00000024;--ui-inset:inset 0 1px 0 #ffffff10;color-scheme:dark}
  #p-admin,#bo-tracking,#dls-customer,.fd-dialog,.cp-share,#dls-workspace{font-size:15px;line-height:1.6;letter-spacing:0}
  .pagehead h1{font-size:24px;line-height:1.4;letter-spacing:0}
  #p-admin :is(h2,h3,h4),#dls-home-view h1,.fd-dialog h2{letter-spacing:0}
  #p-admin .pagehead{padding-top:24px}
  #p-admin .admbar h3{font-size:18px;line-height:1.45}
  #p-admin :is(.btn,.chip){font-size:14px;min-width:44px;min-height:44px;padding:8px 12px;border-radius:8px;line-height:1.5;white-space:normal}
  #p-admin :is(input,select,textarea):not([type=checkbox]):not([type=radio]),#dls-workspace :is(input,select,textarea):not([type=checkbox]):not([type=radio]){font-family:var(--font);font-size:16px;min-height:44px}
  #p-estimate :is(input,select,textarea):not([type=checkbox]):not([type=radio]){min-height:44px}
  #p-estimate .wqkind label,#p-admin .boseg label{min-height:44px}
  #p-admin select,.fd-dialog select{height:44px;padding-block:8px}
  #p-admin .botabs{gap:4px;padding-bottom:8px}
  #p-admin .botabs button{font-size:14px;min-height:44px;padding:8px 12px;border-radius:8px}
  #dls-app-header,#dls-app-nav{background:var(--surface);box-shadow:var(--ui-inset),var(--ui-shadow);font-family:var(--font)}
  #dls-app-header a{font-size:16px;font-weight:600;letter-spacing:0}
  #dls-app-header a img{width:28px;height:28px;border-radius:6px}
  #dls-app-header button{font-size:13px;min-width:44px;box-shadow:var(--ui-inset),0 2px 8px #0000000a}
  #dls-app-nav button{font-size:12px;gap:4px;border-radius:8px}
  #dls-app-nav button[aria-current=page]{color:var(--fg);background:color-mix(in srgb,var(--blue) 10%,transparent)}
  #dls-app-nav button[aria-current=page] .dls-ui-icon{color:var(--blue)}
  #dls-app-nav .dls-ui-icon{width:24px;height:24px}
  #dls-app-nav .dls-ui-label{font-size:12px;line-height:1.4;font-weight:500}
  #dls-workspace{padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}
  #dls-home-view h1{font-size:26px;font-weight:600;line-height:1.35;margin:8px 0 18px}
  .dls-work-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1px}
  .dls-work-grid button{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:60px;padding:12px;background:var(--surface);border:0;border-radius:0;box-shadow:none;font-size:15px;font-weight:400;line-height:1.5;min-width:0}
  .dls-work-grid button.dls-first{border-radius:8px 8px 0 0}
  .dls-work-grid button.dls-last{border-radius:0 0 8px 8px}
  .dls-work-grid button.dls-first.dls-last{border-radius:8px}
  .dls-work-grid button::after{content:"";margin-left:auto;flex:none;width:18px;height:18px;background:var(--muted);mask:url('/app/icons/chevron-right.svg') center/contain no-repeat}
  .dls-work-grid .dls-ui-label{flex:1;min-width:0;text-align:left;overflow-wrap:anywhere}
  .dls-work-grid .dls-ui-icon,#fd-root .fd-icon-tile{--icon-tile:#176ac2;width:34px;height:34px;border-radius:8px;background:linear-gradient(155deg,#ffffff26,#ffffff00),var(--icon-tile);color:#fff;box-shadow:inset 0 1px 0 #ffffff70,inset 0 -1px 0 #00000014,0 2px 5px #00000018}
  .dls-work-grid .dls-ui-glyph{width:22px;height:22px}
  .dls-work-grid [data-work-tab=tracking] .dls-ui-icon{--icon-tile:#b95700}
  .dls-work-grid [data-work-tab=expenses] .dls-ui-icon{--icon-tile:#9b28b5}
  .dls-work-grid [data-work-tab=chat] .dls-ui-icon{--icon-tile:#147d52}
  .dls-work-grid [data-work-tab=text] .dls-ui-icon{--icon-tile:#5b55aa}
  .dls-work-grid [data-work-tab=boq] .dls-ui-icon{--icon-tile:#006e86}
  .dls-work-grid [data-work-tab=leads] .dls-ui-icon{--icon-tile:#c03656}
  .dls-work-grid [data-work-tab=home] .dls-ui-icon{--icon-tile:#626268}
  #dls-scan-now{font-size:20px;font-weight:500;border-radius:8px;box-shadow:var(--ui-shadow)}
  #dls-scan-now .dls-ui-icon{width:64px;height:64px;padding:14px;border-radius:8px;background:#9b28b5;color:#fff;box-shadow:inset 0 1px 0 #ffffff70,0 3px 10px #00000018}
  #dls-pick-file{min-height:44px;font-size:14px}
  #fd-root h2{font-size:24px;line-height:1.4}
  #fd-root h3,.st-toolbar h2{font-size:20px;line-height:1.4}
  #fd-root .fd-intro{gap:12px;margin:10px 0 14px}
  #fd-root .fd-brand{font-size:13px}
  #fd-root .fd-intro img{width:96px;height:70px;box-shadow:0 2px 8px #00000012}
  #fd-root .fd-actions{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px;padding-bottom:14px}
  #fd-root .fd-actions button{flex-direction:column;gap:6px;background:var(--surface);color:var(--fg)!important;border-color:var(--line);font-size:13px!important;padding:10px 6px;font-weight:500}
  #fd-root .fd-actions [data-fd=new]{background:var(--surface);border-color:var(--line)}
  #fd-root .fd-tiles{gap:8px}
  #fd-root .fd-tiles button{background:var(--surface);color:var(--fg)!important;border:1px solid var(--line);font-size:14px!important;font-weight:500;padding:10px 6px;box-shadow:none}
  #fd-root .fd-tiles button:disabled{background:var(--surface);opacity:.55!important}
  #fd-root .fd-icon-tile .fd-icon{width:22px;height:22px;color:#fff}
  #fd-root .fd-tile-plus,#fd-root .fd-tile-log-in{--icon-tile:#b95700}
  #fd-root .fd-tile-log-out,#fd-root .fd-tile-users{--icon-tile:#147d52}
  #fd-root .fd-tile-banknote{--icon-tile:#176ac2}
  #fd-root .fd-tile-receipt-text{--icon-tile:#9b28b5}
  #fd-root .fd-tile-images{--icon-tile:#006e86}
  #fd-root button:disabled .fd-icon-tile{--icon-tile:#626268}
  #fd-root .fd-purchase{font-size:15px;font-weight:500;padding:12px;gap:10px}
  #fd-root .fd-proxy{font-size:14px;gap:10px}
  #fd-root #fd-owner .fd-links{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
  #fd-owner .fd-links button{display:flex;align-items:center;gap:10px;text-decoration:none;text-align:left;background:var(--surface);border-bottom:1px solid var(--line);padding:10px 12px;min-height:54px;border-radius:0;font-size:14px!important}
  #fd-owner .fd-links button:first-child{border-radius:8px 8px 0 0}
  #fd-owner .fd-links button:last-child{border-radius:0 0 8px 8px}
  #fd-owner [data-owner-metrics]{gap:8px}
  #fd-owner [data-owner-metrics] b{font-size:22px;font-variant-numeric:tabular-nums}
  #fd-root .fd-team-person{align-items:flex-start;flex-wrap:wrap;gap:4px 8px}
  #fd-root .fd-team-person b{font-size:15px}
  #fd-root .fd-team-list dl{font-size:13px;line-height:1.6}
  #fd-root .fd-team-state,#fd-root .fd-team-list small{font-size:12px}
  .st-jobs{gap:1px}
  #bo-tracking .st-job,.dls-app.dls-tracking #bo-tracking .st-job{background:var(--surface);border:0;border-radius:8px;box-shadow:none;padding:14px;gap:6px}
  #bo-tracking .st-job-heading>b{font-size:16px;line-height:1.5;font-weight:600}
  #bo-tracking .st-tag{font-size:12px}
  #bo-tracking .st-detail h3{font-size:20px;line-height:1.5}
  #bo-tracking .st-detail h4{font-size:17px;line-height:1.5;margin-top:22px}
  .fd-dialog-head h2{font-size:20px;font-weight:600;line-height:1.5}
  .fd-dialog,.cp-share{font-family:var(--font);font-weight:400;padding:16px}
  .dls-app .fd-error{color:#a12d2d}
  .fd-form :is(input,select,textarea),.cp-share select{font-family:var(--font);font-size:16px}
  .fd-album-tabs button[aria-selected=true]{color:var(--fg);border-bottom-color:var(--blue)}
  #dls-customer .cp-job,#dls-customer .cp-doc{background:var(--surface);padding:12px;border-radius:8px;margin-bottom:2px;min-height:54px;font-size:15px}
  #dls-customer .cp-head h2{font-size:22px;line-height:1.5;font-weight:600;color:var(--fg)}
  #dls-customer h3{font-size:18px;line-height:1.5;font-weight:600;color:var(--fg)}
  #p-admin :is(button,a,input,select,textarea):focus-visible,#dls-workspace button:focus-visible,#dls-app-nav button:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
  @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
    #dls-app-header,#dls-app-nav{background:var(--ui-glass,var(--surface));backdrop-filter:blur(12px) saturate(1.15);-webkit-backdrop-filter:blur(12px) saturate(1.15)}
  }
}
@media screen and (max-width:899px) and (prefers-color-scheme:dark){
  :root.dls-app:not([data-theme=light]),:root.dls-app.dls-tracking:not([data-theme=light]){--bg:#080809;--surface:#1c1c1e;--fg:#f5f5f7;--muted:#b0b0b8;--line:#3b3b40;--faint:#8d8d96;--gold:#ffc177;--goldtext:#ffc177;--blue:#82baff;--green:#86d9b6;--on-blue:#121214;--on-green:#121214;--ui-glass:rgba(28,28,30,.92);--ui-shadow:0 3px 14px #00000024;--ui-inset:inset 0 1px 0 #ffffff10;color-scheme:dark}
  :root.dls-app:not([data-theme=light]) .fd-error{color:#ffada7}
  :root.dls-app:not([data-theme=light]) #st-status[data-state=offline]{color:#e3a367}
}
@media screen and (max-width:899px){:root.dls-app[data-theme=dark] .fd-error{color:#ffada7}}
@media screen and (max-width:360px){
  #dls-home-view h1{font-size:24px}
  #fd-root h2{font-size:22px}
}
@media screen and (max-width:899px) and (prefers-reduced-motion:no-preference){
  .dls-work-grid button,#fd-root .fd-actions button,#fd-root .fd-tiles button{transition:transform .14s ease,background-color .14s ease}
  .dls-work-grid button:active,#fd-root .fd-actions button:not(:disabled):active,#fd-root .fd-tiles button:not(:disabled):active{transform:scale(.98)}
}
@media screen and (max-width:899px) and (prefers-reduced-motion:reduce){
  #p-admin *,#dls-workspace *,#dls-app-header *,#dls-app-nav *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media screen and (max-width:899px) and (prefers-reduced-transparency:reduce){
  #dls-app-header,#dls-app-nav{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}
}
@media screen and (orientation:landscape) and (max-height:600px) and (max-width:899px){
  #fd-root .fd-actions button{flex-direction:row;padding:8px 6px}
  #fd-root .fd-tiles button{height:64px;min-height:64px;flex-direction:row}
  #fd-root .fd-icon-tile{width:30px;height:30px}
  #fd-root .fd-intro img{height:56px}
  #dls-home-view h1{font-size:22px;margin:0 0 12px}
}
