/* 2026-11-30 (user: "is tarah ka UI/UX mobile mein; laptop jaisa hai waisa; colour wahi; features wahi; sirf UI/UX"):
   WorkDesk phone layout after the user's demo -- hero band, lifted check-in card, alert stack, quick tiles, flat
   bottom nav, slide-in pages. Phone widths only; the WorkDesk colours (dark green + gold) are kept. No function changes. */
@media (max-width:700px){
  body{background:var(--bg)!important}
  /* top bar joins the hero band */
  .topbar{background:#323f2f!important;border-bottom:0!important;box-shadow:none!important;backdrop-filter:none!important}
  .topbar::after,.topbar+div[style*="linear-gradient"]{display:none!important}
  /* hero band (built by wd-mobile.js) */
  #wdmHero{margin:-16px -16px 0;padding:14px 20px 74px;background:linear-gradient(160deg,#323f2f,#0b0e08);color:#f7f9f2}
  #wdmHero .wdm-hello{font-size:25px;font-weight:700;line-height:1.2;margin:4px 0 4px;letter-spacing:-.01em}
  #wdmHero .wdm-sub{font-size:13.5px;color:#c7d3ba}
  #pg-home .hero-card{margin-top:-60px!important;position:relative;z-index:2;border-radius:16px!important;
    border:1px solid var(--border)!important;box-shadow:0 10px 28px rgba(0,0,0,.45)!important;background:#252f1c!important;padding:16px!important}
  #pg-home .hero-card .hero-greeting,#pg-home .hero-card .hero-sub{display:none!important}
  #pg-home .hero-card .clock-ring{background:none!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0 0 6px!important;width:auto!important;height:auto!important;text-align:left!important;display:block!important}
  #pg-home .hero-card .clock-time{font-size:38px!important;line-height:1.05!important;text-align:left!important;letter-spacing:-.01em}
  #pg-home .hero-card .clock-date{display:none!important}   /* the date is already in the hero band */
  #pg-home .hero-card .att-status{text-align:left!important;margin:8px 0 12px!important;font-size:13px!important}
  #pg-home .hero-card .mode-row{gap:12px!important;margin-bottom:16px!important}   /* 2026-12-02: 2x2 chip grid (workdesk.html) */
  #pg-home .hero-card .mode-btn{border-radius:8px!important;padding:8px 12px!important;font-size:13.5px!important}
  #pg-home .hero-card .btn-checkin{border-radius:10px!important;padding:14px!important;font-size:16px!important;box-shadow:none!important;width:100%}
  /* TO DO = alert stack (gold left edge); collapsed it shows the first card with the others peeking behind */
  #wdTodoBox{position:relative;margin:14px 0 16px!important;padding:0!important;border:0!important;background:none!important}
  #wdTodoBox .wd-todo-h{display:flex;justify-content:space-between;align-items:center;font-size:12px!important;letter-spacing:.06em;color:#ffd700;margin:0 2px 8px;cursor:pointer}
  #wdTodoBox .wd-todo-h::after{content:'Show all ▾';letter-spacing:0;font-weight:600;color:#c7d3ba;font-size:12px}
  #wdTodoBox.wdm-open .wd-todo-h::after{content:'Fold ▴'}
  html body #wdTodoBox>div[id]{position:relative;margin:0 0 8px!important;border-radius:12px!important;border:1px solid var(--border)!important;border-left:3px solid #ffd700!important;
    background:#252f1c!important;padding:12px 14px!important;transition:transform .25s,opacity .25s,margin .25s}
  #wdTodoBox:not(.wdm-open)>div[id]:not([data-wdm="1"]){display:none!important}
  #wdTodoBox:not(.wdm-open)>div[data-wdm="1"]{z-index:3;margin-bottom:0!important}
  #wdTodoBox.wdm-n2:not(.wdm-open),#wdTodoBox.wdm-n3:not(.wdm-open){padding-bottom:14px!important}
  #wdTodoBox.wdm-n2:not(.wdm-open)::after,#wdTodoBox.wdm-n3:not(.wdm-open)::after{content:'';position:absolute;left:8px;right:8px;bottom:6px;height:10px;
    border:1px solid var(--border);border-top:0;border-radius:0 0 12px 12px;background:#1f281a;z-index:1}
  #wdTodoBox.wdm-n3:not(.wdm-open)::before{content:'';position:absolute;left:16px;right:16px;bottom:0;height:8px;
    border:1px solid var(--border);border-top:0;border-radius:0 0 12px 12px;background:#192114;z-index:0}
  /* quick tiles */
  #wdmTiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 16px}
  #wdmTiles button{background:#252f1c;border:1px solid var(--border);border-radius:12px;padding:14px 4px 12px;color:#f7f9f2;font:inherit;font-size:12.5px;font-weight:600;
    display:flex;flex-direction:column;align-items:center;gap:7px;cursor:pointer;-webkit-tap-highlight-color:transparent}
  #wdmTiles button:active{background:#323f2f}
  #wdmTiles svg{width:22px;height:22px;fill:none;stroke:#ffd700;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  /* cards: flat, one border, same radius */
  .page .card{border-radius:14px!important;box-shadow:none!important}
  .sec-hdr{font-size:12px!important;letter-spacing:.06em}
  .sec-hdr::after,.sec-hdr::before{display:none!important}
  /* leave balance: thin bars like the demo */
  .lb-card{box-shadow:none!important;border-radius:12px!important}
  .lb-card .lb-bar{height:6px!important;border-radius:6px!important}
  /* bottom nav: flat, gold top line on the open tab */
  .bottom-nav{background:#0b0e08!important;border-top:1px solid var(--border)!important;box-shadow:0 -6px 24px rgba(0,0,0,.45)!important;backdrop-filter:none!important}
  .bottom-nav .nav-item,.bottom-nav .nav-item-more{border-top:2px solid transparent!important;border-radius:0!important;background:none!important;box-shadow:none!important}
  .bottom-nav .nav-item.active{border-top-color:#ffd700!important;color:#ffd700!important}
  .bottom-nav .nav-item.active::before,.bottom-nav .nav-item.active::after{display:none!important}
  /* pages slide in from the right */
  .page.active{animation:wdmIn .28s cubic-bezier(.2,.8,.2,1)}
  @keyframes wdmIn{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
  /* bottom sheets (More, modals) open from the bottom with a grab handle */
  .modal-overlay .modal-box{border-radius:18px 18px 0 0!important}
}
/* Reimb: My Submitted Claims as cards (was a 560px-wide table cut off on a phone) */
@media (max-width:700px){
  .ulf-tl-bar{display:none!important}
  .rb-tbl-wrap,.rb-tbl-wrap .ulf-tscroll,.ulf-tscroll:has(>.rb-tbl){overflow:visible!important;max-height:none!important;border:0!important;width:auto!important;min-width:0!important}
  .rb-tbl{min-width:0!important;width:100%!important}
  .rb-tbl td,.rb-tbl th{white-space:normal!important;overflow-wrap:anywhere;position:static!important;max-width:none!important}
  .rb-tbl .ulf-clamp,.rb-tbl td>div{-webkit-line-clamp:unset!important;display:block;overflow:visible!important}
  table:has(#rbHist){display:block!important;min-width:0!important;width:100%!important;table-layout:auto!important}
  html body #pg-reimb table.rb-tbl,html body #pg-reimb table.rb-tbl.ulf-dt{width:100%!important;max-width:100%!important;min-width:0!important}
  html body #rbHist>tr>td{min-width:0!important;max-width:none!important;width:auto!important}
  table:has(#rbHist) thead{display:none}
  #rbHist{display:block}
  #rbHist>tr{display:block}
  #rbHist>tr:not(:has(td[colspan])){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:12px 12px 6px;border-top:1px solid var(--border);background:#252f1c!important}
  #rbHist>tr:first-child{border-top:0}
  #rbHist>tr>td{display:block;border:0!important;padding:0!important;background:none!important}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(1){grid-column:1;grid-row:1;font-weight:700}
  html body #rbHist>tr:not(:has(td[colspan]))>td:nth-child(n+4){max-width:44vw!important;white-space:normal!important;overflow-wrap:anywhere}
  html body #rbHist>tr:not(:has(td[colspan]))>td:nth-child(1){min-width:44vw!important}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(4){grid-column:2;grid-row:1;text-align:right;font-size:15px}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(2){grid-column:1;grid-row:2;color:var(--text2);font-size:12px}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(5){grid-column:2;grid-row:2;text-align:right}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(3){grid-column:1;grid-row:3;color:var(--text2);font-size:12px}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(3)::before{content:'Items: '}
  #rbHist>tr:not(:has(td[colspan]))>td:nth-child(6){grid-column:2;grid-row:3;text-align:right}
  #rbHist>tr:has(td[colspan])>td{padding:4px 12px 12px!important;background:#252f1c!important;font-size:12px;line-height:1.55}
}
/* Tasks: each task a card, priority edge, Due + status on one line, Done / Remove side by side */
@media (max-width:700px){
  html body .wdtsk-item{background:#252f1c;border:1px solid var(--border)!important;border-left:3px solid #8fae74!important;border-radius:12px;padding:14px!important;margin:0 0 10px}
  html body .wdtsk-item:has(.wdtsk-pill-high){border-left-color:#ffd700!important}
  html body .wdtsk-top{gap:10px!important}
  html body .wdtsk-title{font-size:15px;line-height:1.35}
  html body .wdtsk-right{flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-width:0!important;width:100%;
    border-top:1px solid rgba(255,255,255,.07);padding-top:10px}
  html body .wdtsk-due{order:1;text-align:left!important;white-space:nowrap;font-size:12.5px!important}
  html body .wdtsk-due br{display:none}
  html body .wdtsk-due b{margin-left:4px;display:inline!important}
  html body .wdtsk-right::before{content:'';order:3;flex-basis:100%;height:0}
  html body .wdtsk-right>.wdtsk-badge,html body .wdtsk-right>span{order:2;margin-left:auto}
  html body .wdtsk-right>.wdtsk-donebtn{order:4;flex:1 1 40%;justify-content:center;white-space:nowrap;margin-top:0!important;padding:9px 10px!important;font-size:13px!important}
}
/* Leave history, payslips and other small tables: fit the phone (the shared MIS table rules gave them laptop widths) */
@media (max-width:700px){
  html body #appView .ulf-tscroll>table.ulf-dt{width:100%!important;min-width:0!important;max-width:100%!important}
  html body #appView table.ulf-dt th,html body #appView table.ulf-dt td{min-width:0!important;padding:8px 6px!important;font-size:12.5px}
  html body #appView table.ulf-dt .ulf-c-text,html body #appView table.ulf-dt .ulf-c-ref{white-space:normal!important}
  html body #appView table.ulf-dt .ulf-c-date{white-space:normal!important}
}
/* Payslip: the Download button shows only its arrow on a phone (same button, same action) */
@media (max-width:700px){
  html body #pg-salary table td:last-child button,html body #pg-salary table td:last-child a{font-size:0!important;padding:7px 10px!important;min-width:0!important}
  html body #pg-salary table td:last-child button::before,html body #pg-salary table td:last-child a::before{content:'⬇';font-size:15px}
}
@media (max-width:700px) and (prefers-reduced-motion:reduce){.page.active{animation:none}#wdTodoBox>div[id]{transition:none}}
