/* Helen & Sons HRIS — mobile app layout inspired by supplied reference.
   Presentation-only. Existing navy/gold palette, permission checks and data remain authoritative.
   Never show a scanner event as a confirmed IN/OUT or payroll record. */
.hs-mobile-greeting,.hs-mobile-hero,.hs-mobile-quick,.hs-mobile-dock{display:none!important}
@media(max-width:900px){
  html[data-theme] #app-screen .workspace{min-width:0!important;width:100%!important;flex:1 1 auto!important}
  html[data-theme] #app-screen .topbar{
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    position:sticky!important;top:0!important;z-index:110!important;
    height:87px!important;min-height:87px!important;flex:0 0 87px!important;
    padding:10px 16px 11px!important;gap:11px!important;
    background:var(--hs-canvas)!important;color:var(--hs-ink)!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
  }
  html[data-theme] #app-screen .topbar .mobile-nav-label,
  html[data-theme] #app-screen .topbar .premium-top-title,
  html[data-theme] #app-screen .topbar .premium-search-wrap,
  html[data-theme] #app-screen .topbar .breadcrumb,
  html[data-theme] #app-screen .topbar .server-state,
  html[data-theme] #app-screen .topbar .separator,
  html[data-theme] #app-screen .topbar .theme-switch,
  html[data-theme] #app-screen .topbar .top-user{display:none!important}
  html[data-theme] #app-screen .topbar .mobile-menu-toggle{
    display:grid!important;place-items:center!important;flex:0 0 40px!important;
    width:40px!important;height:40px!important;border-radius:14px!important;
    border:1px solid var(--hs-line)!important;background:var(--hs-card)!important;
    color:var(--hs-ink)!important;font-size:21px!important;box-shadow:none!important;
  }
  html[data-theme] #app-screen .topbar .hs-mobile-greeting{
    display:flex!important;flex:1 1 auto;min-width:0;
    flex-direction:column;justify-content:center;gap:3px;
  }
  html[data-theme] #app-screen .hs-mobile-greeting small{
    color:var(--hs-muted)!important;font-size:9px!important;
    font-weight:800!important;letter-spacing:.15em!important;
  }
  html[data-theme] #app-screen .hs-mobile-greeting strong{
    color:var(--hs-ink)!important;display:block;max-width:100%;
    font-size:clamp(17px,4.3vw,22px)!important;font-weight:850!important;
    letter-spacing:-.045em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  html[data-theme] #app-screen .topbar .topbar-actions{margin-left:0!important;gap:7px!important;flex:0 0 auto}
  html[data-theme] #app-screen .topbar .notification-bell:not(.hidden){
    display:grid!important;place-items:center!important;width:38px!important;height:38px!important;
    min-width:38px!important;border-radius:13px!important;
    border:1px solid var(--hs-line)!important;background:var(--hs-card)!important;
    color:var(--hs-ink)!important;font-size:18px!important;
  }
  html[data-theme] #app-screen .topbar .account-circle{
    display:grid!important;place-items:center!important;flex:0 0 39px!important;
    width:39px!important;height:39px!important;min-width:39px!important;
    border:2px solid #d6a74f!important;border-radius:50%!important;
    background:#eed18a!important;color:#142052!important;font-weight:900!important;
  }
  html[data-theme] #app-screen .page-wrap{
    padding:5px 16px calc(116px + env(safe-area-inset-bottom,0px))!important;
    width:100%!important;min-width:0!important;overflow-x:clip;
  }
  html[data-theme] #app-screen .page{min-width:0!important}
  html[data-theme] #page-overview{display:flex!important;flex-direction:column!important}
  html[data-theme] #page-overview.hidden{display:none!important}
  html[data-theme] #page-overview .studio-hero,
  html[data-theme] #page-overview .studio-tabs{display:none!important}
  html[data-theme] #page-overview > .hs-mobile-hero{display:block!important;order:0!important}
  html[data-theme] #page-overview > .hs-mobile-quick{display:grid!important;order:1!important}
  html[data-theme] #page-overview > .page-heading{order:2!important}
  html[data-theme] #page-overview > .premium-analytics{order:3!important}
  html[data-theme] #page-overview > .dashboard-metrics{order:4!important}
  html[data-theme] #page-overview > .premium-live-attendance{order:5!important}
  html[data-theme] #page-overview > .premium-lower-overview{order:6!important}
  html[data-theme] #page-overview > .overview-action-strip{order:7!important}
  html[data-theme] #page-overview > .overview-middle{order:8!important}
  html[data-theme] #page-overview > .overview-grid{order:9!important}
  html[data-theme] #page-overview > .h7-main-panel{order:10!important}
  html[data-theme] #page-overview > .recent-attendance{order:11!important}

  /* Hero: the reference image's two-tone card, now in company navy and gold. */
  html[data-theme] #page-overview .hs-mobile-hero{
    position:relative;overflow:hidden;width:100%;margin:2px 0 15px!important;
    border:1px solid rgba(20,31,79,.12)!important;border-radius:25px!important;
    box-shadow:0 12px 27px rgba(15,29,78,.14)!important;background:#132055!important;
  }
  html[data-theme] #page-overview .hs-mobile-hero-top{
    position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;
    min-height:76px;padding:19px 20px!important;
    background:linear-gradient(110deg,#f4dc9e 0%,#edc879 62%,#e6b65c 100%)!important;
    color:#152150!important;
  }
  html[data-theme] #page-overview .hs-mobile-hero-top::after{
    content:"";position:absolute;top:-37px;right:19%;width:115px;height:115px;
    border:2px solid rgba(21,33,80,.12);border-radius:50%;pointer-events:none;
  }
  html[data-theme] #page-overview .hs-mobile-hero-top strong{
    font-size:14px!important;font-weight:870!important;letter-spacing:-.035em;
    color:#152150!important;position:relative;z-index:1;
  }
  html[data-theme] #page-overview .hs-mobile-hero-top span{
    font-size:10px!important;font-weight:800!important;white-space:nowrap;
    color:#233160!important;position:relative;z-index:1;
  }
  html[data-theme] #page-overview .hs-mobile-hero-bottom{
    position:relative;min-height:177px;padding:23px 21px 23px!important;
    display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
    background:linear-gradient(145deg,#192861 0%,#0f1a49 100%)!important;
    color:#fff!important;
  }
  html[data-theme] #page-overview .hs-mobile-hero-bottom::after{
    content:"";position:absolute;right:-26px;bottom:-71px;width:170px;height:170px;
    border:2px solid rgba(235,196,110,.22);border-radius:50%;
    box-shadow:0 0 0 19px rgba(235,196,110,.055),0 0 0 39px rgba(235,196,110,.04);
    pointer-events:none;
  }
  html[data-theme] #page-overview .hs-mobile-hero-kicker{
    font-size:11px!important;font-weight:640!important;color:#e9debf!important;
    line-height:1.4;position:relative;z-index:1;
  }
  html[data-theme] #page-overview .hs-mobile-hero-value{
    color:#fff!important;font-size:42px!important;font-weight:900!important;
    line-height:1.2!important;margin:7px 0 3px!important;letter-spacing:-.075em!important;
    position:relative;z-index:1;font-variant-numeric:tabular-nums;
  }
  html[data-theme] #page-overview .hs-mobile-hero-foot{
    font-size:10px!important;line-height:1.55;color:#bfc9e8!important;
    max-width:74%;position:relative;z-index:1;
  }

  /* Two quick actions under the hero, like the supplied phone reference. */
  html[data-theme] #page-overview .hs-mobile-quick{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;
    margin:0 0 17px!important;
  }
  html[data-theme] #page-overview .hs-mobile-quick-card{
    position:relative;display:flex;flex-direction:column;align-items:flex-start;
    text-align:left;gap:8px;min-width:0;min-height:151px;padding:17px 14px 15px!important;
    background:var(--hs-card)!important;color:var(--hs-ink)!important;
    border:1px solid var(--hs-line)!important;border-radius:21px!important;
    box-shadow:var(--hs-shadow)!important;cursor:pointer;
  }
  html[data-theme] #page-overview .hs-mobile-quick-card:focus-visible{
    outline:3px solid #e7bd62!important;outline-offset:2px;
  }
  html[data-theme] #page-overview .hs-mobile-quick-icon{
    display:grid;place-items:center;width:40px;height:40px;border-radius:13px;
    background:var(--hs-soft)!important;color:var(--hs-ink)!important;
  }
  html[data-theme] #page-overview .hs-mobile-quick-icon svg{width:22px;height:22px;stroke:currentColor}
  html[data-theme] #page-overview .hs-mobile-quick-card:last-child .hs-mobile-quick-icon{
    background:#f6e6c2!important;color:#27305a!important;
  }
  html[data-theme] #page-overview .hs-mobile-quick-card strong{
    color:var(--hs-ink)!important;font-size:16px!important;font-weight:850!important;letter-spacing:-.03em;
  }
  html[data-theme] #page-overview .hs-mobile-quick-card small{
    color:var(--hs-muted)!important;font-size:10px!important;line-height:1.35;
  }

  html[data-theme] #page-overview > .premium-dashboard-heading{
    display:block!important;margin:0 0 14px!important;
  }
  html[data-theme] #page-overview > .premium-dashboard-heading > div:first-child{display:none!important}
  html[data-theme] #page-overview .premium-dashboard-heading .premium-dashboard-tools{
    width:100%!important;display:flex!important;gap:9px!important;flex-wrap:nowrap!important;
    justify-content:space-between!important;
  }
  html[data-theme] #page-overview .premium-dashboard-heading .premium-date-pill{
    min-width:0!important;flex:1 1 auto!important;border-radius:13px!important;
    min-height:44px!important;
  }
  html[data-theme] #page-overview .premium-dashboard-heading button.reload-btn{
    min-width:0!important;flex:0 0 auto!important;min-height:44px!important;
    padding:9px 12px!important;white-space:nowrap;font-size:11px!important;
  }

  html[data-theme] #page-overview > .premium-analytics{
    grid-template-columns:minmax(0,1fr)!important;gap:13px!important;margin:0 0 16px!important;
  }
  html[data-theme] #page-overview .premium-analytics .premium-analytics-card{
    border-radius:22px!important;padding:17px 14px!important;min-height:0!important;
    box-shadow:var(--hs-shadow)!important;
  }
  html[data-theme] #page-overview .premium-analytics .premium-chart-heading{
    padding:0 0 12px!important;min-height:0!important;
  }
  html[data-theme] #page-overview .premium-analytics .premium-chart-heading p{
    font-size:11px!important;line-height:1.45!important;
  }
  html[data-theme] #page-overview .premium-analytics .premium-chart-heading h2{
    font-size:17px!important;line-height:1.25!important;
  }
  html[data-theme] #page-overview > .dashboard-metrics{
    margin:0 0 16px!important;padding:15px 13px!important;border-radius:22px!important;
  }
  html[data-theme] #page-overview .dashboard-metrics .metric-grid{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;
  }
  html[data-theme] #page-overview .dashboard-metrics .metric-card{
    min-width:0!important;min-height:142px!important;border-radius:17px!important;
    padding:64px 13px 13px!important;
  }
  html[data-theme] #page-overview .dashboard-metrics .metric-card>strong{
    font-size:28px!important;line-height:1.1!important;
  }
  html[data-theme] #page-overview .dashboard-metrics .metric-card>small{
    line-height:1.4!important;overflow-wrap:anywhere;
  }

  /* Replace only the Overview's read-only live-attendance table with readable cards. */
  html[data-theme] #page-overview > .premium-live-attendance{
    border-radius:22px!important;padding:16px 13px!important;margin:0 0 16px!important;
  }
  html[data-theme] #page-overview .premium-live-attendance .premium-live-heading{
    display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;gap:11px!important;
  }
  html[data-theme] #page-overview .premium-live-attendance .premium-live-filters{
    display:flex!important;gap:8px!important;flex-wrap:wrap!important;width:100%!important;
  }
  html[data-theme] #page-overview .premium-live-attendance .premium-live-filters :is(input,select){
    min-width:0!important;flex:1 1 130px!important;width:auto!important;
  }
  html[data-theme] #page-overview .premium-live-attendance .table-scroll{
    overflow:visible!important;max-width:100%!important;border:0!important;box-shadow:none!important;
  }
  html[data-theme] #page-overview .premium-live-attendance table{
    display:block!important;width:100%!important;min-width:0!important;border:0!important;
  }
  html[data-theme] #page-overview .premium-live-attendance thead{display:none!important}
  html[data-theme] #page-overview .premium-live-attendance tbody{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody tr{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px 11px!important;align-items:start;padding:14px!important;min-width:0;
    background:var(--hs-soft)!important;border:1px solid var(--hs-line)!important;
    border-radius:17px!important;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody td{
    display:block!important;min-width:0!important;max-width:100%!important;
    border:0!important;padding:0!important;background:transparent!important;
    color:var(--hs-ink)!important;font-size:12px!important;overflow-wrap:anywhere;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody td:first-child,
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(5),
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(6){
    grid-column:1/-1!important;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(2)::before,
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(3)::before,
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(4)::before{
    display:block;font-size:9px;font-weight:850;letter-spacing:.06em;
    color:var(--hs-muted);margin-bottom:5px;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(2)::before{content:"EMP CODE"}
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(3)::before{content:"FIRST SCAN"}
  html[data-theme] #page-overview .premium-live-attendance tbody td:nth-child(4)::before{content:"LAST SCAN"}
  html[data-theme] #page-overview .premium-live-attendance .premium-live-review{
    width:100%!important;min-height:41px!important;border-radius:11px!important;
    background:var(--hs-card)!important;color:var(--hs-ink)!important;
    border:1px solid var(--hs-line)!important;text-align:center;
  }
  html[data-theme] #page-overview .premium-live-attendance tbody tr:has(.empty-row){
    display:block!important;text-align:center;padding:20px 12px!important;
  }

  /* Keep every other HR workflow usable at narrow widths. */
  html[data-theme] #app-screen .page :is(.table-scroll,.h7-table-viewport){
    max-width:100%!important;overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  html[data-theme] #app-screen .page :is(input,select,textarea){
    max-width:100%!important;min-width:0!important;
  }
  html[data-theme] #app-screen .page .panel{border-radius:20px!important}
  html[data-theme] #app-screen .page .panel-title-row{flex-wrap:wrap!important;gap:11px!important}
  html[data-theme] #app-screen .page .panel-title-row .filters{max-width:100%}
  html[data-theme] #app-screen .page .page-heading h1{font-size:25px!important}
  html[data-theme] #app-screen .workspace-footer{padding-bottom:125px!important}

  /* Native-app-style bottom dock. 'More' opens the real, role-filtered sidebar. */
  html[data-theme] #app-screen .hs-mobile-dock{
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center;gap:1px;position:fixed;z-index:180;
    left:12px;right:12px;bottom:calc(9px + env(safe-area-inset-bottom,0px));
    min-height:75px;padding:9px 5px!important;border-radius:24px!important;
    background:var(--hs-card)!important;border:1px solid var(--hs-line)!important;
    box-shadow:0 8px 34px rgba(13,25,69,.2)!important;
  }
  html[data-theme] #app-screen .hs-mobile-dock button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:5px;min-width:0;min-height:55px;border:0!important;border-radius:15px!important;
    background:transparent!important;color:var(--hs-muted)!important;
    padding:5px 2px;cursor:pointer;
  }
  html[data-theme] #app-screen .hs-mobile-dock button svg{
    width:21px;height:21px;stroke:currentColor;stroke-width:1.85;
    fill:none;stroke-linecap:round;stroke-linejoin:round;
  }
  html[data-theme] #app-screen .hs-mobile-dock button span{
    font-size:9px;font-weight:780;white-space:nowrap;
  }
  html[data-theme] #app-screen .hs-mobile-dock button.active{
    background:var(--hs-soft)!important;color:var(--hs-ink)!important;
  }
  html[data-theme] #app-screen .hs-mobile-dock button.active svg{stroke:#c39641!important}
  html[data-theme] #app-screen .hs-mobile-dock .hs-mobile-more{
    transform:translateY(-13px);width:59px;height:59px;min-height:59px;
    margin:0 auto -12px;border-radius:50%!important;
    background:linear-gradient(145deg,#1a2b72,#0c1747)!important;color:#f4cf83!important;
    border:3px solid var(--hs-card)!important;box-shadow:0 4px 12px rgba(11,21,67,.2)!important;
  }
  html[data-theme] #app-screen .hs-mobile-dock .hs-mobile-more svg{width:25px;height:25px}
  html[data-theme] #app-screen .hs-mobile-dock .hs-mobile-more span{font-size:9px!important;color:#f7d99c!important}
  html[data-theme] #app-screen .hs-mobile-dock button:focus-visible{
    outline:3px solid #d8ad5a!important;outline-offset:2px;
  }
  html[data-theme] body.mobile-menu-active #app-screen .hs-mobile-dock{pointer-events:none}
}
@media(max-width:360px){
  html[data-theme] #app-screen .page-wrap{padding-left:11px!important;padding-right:11px!important}
  html[data-theme] #app-screen .hs-mobile-greeting strong{font-size:16px!important}
  html[data-theme] #app-screen .topbar{padding-left:10px!important;padding-right:10px!important;gap:7px!important}
  html[data-theme] #page-overview .hs-mobile-quick-card{padding:13px 11px!important}
  html[data-theme] #app-screen .hs-mobile-dock{left:7px;right:7px}
}
@media(prefers-reduced-motion:reduce){
  .hs-mobile-quick-card,.hs-mobile-dock button{transition:none!important}
}

/* The third mobile quick action spans both columns: Break Management stays visible
   without replacing the existing More button or the five-item navigation. */
@media(max-width:900px){
  html[data-theme] #page-overview .hs-mobile-quick .hs-mobile-break-card{
    grid-column:1 / -1;
    min-height:82px!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:11px!important;
    padding:13px 16px!important;
  }
  html[data-theme] #page-overview .hs-mobile-break-card .hs-mobile-quick-icon{
    background:#f6e6c2!important;
    color:#27305a!important;
    flex:0 0 42px;
    font-size:23px;
  }
  html[data-theme] #page-overview .hs-mobile-break-card strong{
    font-size:15px!important;
  }
  html[data-theme] #page-overview .hs-mobile-break-card small{
    flex:1 1 140px;
    margin-left:auto;
    text-align:right;
  }
}
