/* The phone app (Phase 27b): Phone & Notifications (frontend/src/shell/push/PushWindow.tsx).  Logical properties only. */
.psh{display:flex;flex-direction:column;gap:16px}
.psh-sec{display:flex;flex-direction:column;gap:10px}
.psh-sec h4{margin:0;font-size:13px;font-weight:700;color:var(--text-primary)}
.psh .int-lead,.psh .int-err{margin:0;padding-inline:0}
.psh-acts{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.psh-acts:empty{display:none}
.psh-note{margin:0;font-size:12.5px;color:var(--text-muted)}
.psh-here{margin-inline-start:8px;vertical-align:middle}
.psh .int-empty{margin:0}
/* GPS-fenced clock-in (frontend/src/pages/attendance): where a punch was made, the site form's Use My Location */
.at-where{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.at-where svg{color:var(--accent);flex:none}
.at-where a{color:var(--accent);text-decoration:none;margin-inline-start:4px}
.at-where a:hover{text-decoration:underline}
.at-punch svg{margin-inline-start:4px;color:var(--accent)}
.at-fence{display:flex;align-items:center;gap:6px}
.ats-where{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.ats-where a{color:var(--accent);font-size:13px}

/* ── Phones (≤ 600 px, Phase 27b slice 3) ─────────────────────────────────────────────────────────────────────────
   The menu leaves the screen and slides in from Menu on the phone bar (shell/menu/PhoneBar.tsx); the top bar keeps the
   title, the AI assistant, the bell and the theme; list rows become cards (kit/DataTable.tsx `dt-cards`).  Tablets
   (601–768 px) keep the narrow rail of styles.css. */
.phone-bar{display:none}
@media (max-width:600px){
  :root{--pb-h:58px}
  .main-wrap,.main-wrap.sidebar-collapsed,#app.nsm-rail .main-wrap,#app.nsm-rail .main-wrap.sidebar-collapsed{margin-inline-start:0;height:100dvh}
  .sidebar,#app.nsm-rail .sidebar{transform:translateX(calc(-100% * var(--dir)));transition:transform .22s cubic-bezier(.4,0,.2,1);box-shadow:none;
    height:calc(100dvh - var(--pb-h) - env(safe-area-inset-bottom))}
  .sidebar.sidebar-open,#app.nsm-rail .sidebar.sidebar-open{transform:none;box-shadow:12px 0 40px rgba(2,6,23,.3)}
  .sidebar-overlay.open{display:block!important;z-index:99}
  .ns-peek{max-width:calc(100vw - var(--ns-rail-w,72px) - 12px);bottom:calc(var(--pb-h) + env(safe-area-inset-bottom))}
  .content-area{padding:12px 12px calc(var(--pb-h) + 16px + env(safe-area-inset-bottom))}

  /* the bar at the foot */
  .phone-bar{display:flex;position:fixed;inset-inline:0;bottom:0;z-index:101;height:calc(var(--pb-h) + env(safe-area-inset-bottom));
    padding:4px 4px env(safe-area-inset-bottom);background:var(--topbar-bg);border-top:1px solid var(--border);box-shadow:0 -6px 20px rgba(2,6,23,.06)}
  .pb-btn{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:none;
    color:var(--text-muted);font:inherit;font-size:10.5px;font-weight:600;cursor:pointer;border-radius:12px;-webkit-tap-highlight-color:transparent}
  .pb-btn.on{color:var(--accent)}
  .pb-btn.on .pb-ic{background:color-mix(in srgb, var(--accent) 12%, transparent)}
  .pb-ic{position:relative;width:44px;height:28px;border-radius:14px;display:flex;align-items:center;justify-content:center}
  .pb-ic svg{width:20px;height:20px}
  .pb-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pb-badge{position:absolute;top:-4px;inset-inline-end:2px;min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border-radius:9px;
    background:var(--red);color:#fff;font-size:9.5px;font-weight:700;line-height:17px;text-align:center;border:2px solid var(--topbar-bg)}

  /* the top bar: the title shortens; what the phone bar or the menu already offers leaves */
  .topbar{padding:0 12px;gap:8px}
  .topbar-left{min-width:0;flex:1 1 auto}
  .topbar-title-row{min-width:0}
  .topbar-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar-breadcrumb{display:none}
  #mobMenuBtn,#gsTrigger,#auditLogsBtn,#topbarPin,.help-topbar-btn,.topbar-divider{display:none!important}
  #topbarTools>div{gap:6px!important;flex:none}

  /* lists: Columns / Export stay on computers; the count and the page's buttons share a row under the search */
  .ra-filter-bar .dt-btn-group,.dt-toolbar{display:none}
  .ra-filter-bar .bar-end{flex:0 1 auto;order:0;margin-inline-start:auto}
  .ra-filter-bar{flex-direction:row;flex-wrap:wrap;align-items:center}
  .ra-filter-bar>.ss,.ra-filter-bar .smart-search,.ra-filter-bar .ra-filter-search{flex:1 1 100%}
  .ra-filter-bar>.ra-fcnt{flex:0 1 auto}
  .at-clock-s{white-space:normal}

  /* record pages: the header's buttons wrap under the title; a card's own buttons drop under its heading; notices
     sit above the phone bar */
  .pr-hero{padding:16px}
  .pr-hero .pr-hero-acts{flex-wrap:wrap!important;flex-shrink:1;margin-inline-start:0;max-width:100%}
  .cqp-head{height:auto;min-height:58px;flex-wrap:wrap;row-gap:8px;padding:10px 16px}
  .toast-container{bottom:calc(var(--pb-h) + env(safe-area-inset-bottom) + 10px)}

  /* list tiles two to a row: a long note ends in … inside its tile */
  .hdl-tile-leg{max-width:100%;min-width:0;overflow:hidden}
  .hdl-tile-note{min-width:0;overflow:hidden;text-overflow:ellipsis}

  /* rows as cards */
  .table-wrap:has(> .data-table.dt-cards){overflow-x:visible}
  .data-table.dt-cards,.data-table.dt-cards>tbody,.data-table.dt-cards>tfoot{display:block;width:100%;min-width:0}
  .data-table.dt-cards>thead{display:none}
  .data-table.dt-cards>tbody>tr,.data-table.dt-cards>tfoot>tr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:5px;
    padding:12px 14px;border-bottom:1px solid var(--border)}
  .data-table.dt-cards>tbody>tr:last-child{border-bottom:0}
  .data-table.dt-cards>tbody>tr>td,.data-table.dt-cards>tfoot>tr>td{grid-column:1 / -1;display:block;padding:0;border:0;min-width:0;
    max-width:none!important;width:auto!important;white-space:normal;text-align:start;background:none!important}
  /* a "Label  value" line: the label on the start side, whatever the cell holds stacked on the end side */
  .data-table.dt-cards>tbody>tr>td[data-label],.data-table.dt-cards>tfoot>tr>td[data-label]{display:grid;grid-template-columns:auto minmax(0,1fr);
    column-gap:12px;row-gap:0;align-items:baseline;justify-items:end;text-align:end}
  .data-table.dt-cards>tbody>tr>td[data-label]>*+*{margin-top:2px}
  .data-table.dt-cards>tbody>tr>td[data-label]::before,.data-table.dt-cards>tfoot>tr>td[data-label]::before{content:attr(data-label);grid-column:1;
    grid-row:1 / span 4;justify-self:start;max-width:40vw;text-align:start;font-size:12px;font-weight:500;color:var(--text-muted)}
  .data-table.dt-cards>tbody>tr>td:empty,.data-table.dt-cards>tfoot>tr>td:empty{display:none}
  .data-table.dt-cards>tbody>tr>td.dt-card-title{grid-column:1;font-weight:600;align-self:center}
  .data-table.dt-cards>tbody>tr>td.dt-card-tool+td.dt-card-title{grid-column:1}
  .data-table.dt-cards>tbody>tr>td.row-acts-cell{grid-column:2;grid-row:1;align-self:start;padding:0}
  .data-table.dt-cards>tbody>tr>td.dt-card-tool~td.row-acts-cell{grid-row:2}
  .data-table.dt-cards>tbody>tr>td[colspan]{display:block;text-align:start}
  .data-table.dt-cards>tbody>tr.dt-grp-row{display:block;padding:8px 14px}
  .data-table.dt-cards>tbody>tr>td>*{min-width:0;max-width:100%}
  .data-table.dt-cards>tbody>tr>td [style*="nowrap"]{white-space:normal!important}
}

/* Take Photo (kit/FileDrop.tsx `photo`, the claim's Expenses card): only where there is a camera to hand — a touch screen */
.fmd-cam,.xp-cam-btn{display:none}
.fmd-cam{margin-top:8px;align-self:flex-start}
@media (pointer:coarse){.fmd-cam,.xp-cam-btn{display:inline-flex}}
@media (max-width:600px){.xp-head-acts{flex-wrap:wrap;justify-content:flex-end}}
