/* HR Manager - styles on top of the shared iPOS app.css (charcoal slate + coral) */
:root { --brand: #be123c; --brand-2: #9f1239; --brand-soft: #ffe4e6; --slate: #1f2937; --slate-2: #111827; --coral: #fb7185; }
.sidenav { background: #1f2937; }
.navlink.active { background: #be123c; }
.login-screen { background: linear-gradient(160deg, #111827, #be123c); }
.shopbar { background: linear-gradient(90deg, #0b1220, #111827 55%, #1f2937); }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.neg { color: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 8px; }
label.f.chk { display: flex; gap: 8px; align-items: center; font-weight: 500; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--brand-soft); }
tr.tot td { border-top: 2px solid var(--line); }
.banner.info { background: #e8edf3; color: #1f2937; }
.banner.info a { color: #be123c; }
.pay-name { white-space: nowrap; }
table.paytbl td, table.paytbl th { white-space: nowrap; padding: 8px 6px; font-size: 13.5px; }
table.paytbl td.small { white-space: normal; }
.ac-list:empty { display: none; }
button.ac-row { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; justify-content: flex-start; cursor: pointer; }
#gsr button.ac-row { border-bottom: 1px solid var(--line); border-radius: 0; }
.ac-row small { display: block; font-size: 12px; }
.more-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); margin: 0; }
.more-item svg { width: 28px; height: 28px; color: var(--brand); }
.feat-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.feat-row input { margin-top: 4px; }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.b-installment { background: #dbeafe; color: #1d4ed8; }

/* attendance */
.abtn { min-width: 34px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; margin-right: 3px; color: #475569; }
.abtn:disabled { opacity: .5; cursor: default; }
.abtn.P.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.abtn.A.on { background: #dc2626; border-color: #dc2626; color: #fff; }
.abtn.LT.on { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.abtn.HF.on { background: #f97316; border-color: #f97316; color: #fff; }
.abtn.LV.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.attgrid td { vertical-align: middle; }
.attgrid input.tin { width: 108px; min-height: 34px; padding: 4px 6px; }
.attgrid input.tin.ot { width: 80px; }
.dstrip { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 5px; font-size: 10.5px; font-weight: 700; margin: 1px; background: #f1f5f9; color: #64748b; }
.dstrip.P { background: #dcfce7; color: #166534; } .dstrip.A { background: #fee2e2; color: #b91c1c; } .dstrip.LT { background: #fef3c7; color: #92400e; } .dstrip.HF { background: #ffedd5; color: #9a3412; }
.dstrip.LV { background: #dbeafe; color: #1d4ed8; } .dstrip.HL { background: #e9d5ff; color: #6b21a8; } .dstrip.OF { background: #e5e7eb; color: #4b5563; } .dstrip.NE { background: transparent; } .dstrip.U { background: #fff; border: 1px dashed #cbd5e1; }
.dstrips { display: flex; flex-wrap: wrap; }
.legend .dstrip { margin: 0 2px 0 0; }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 12px; width: auto; }
table.sheet th, table.sheet td { padding: 0; border-bottom: 1px solid var(--line); border-right: 1px solid #f1f5f9; }
table.sheet th.dh { min-width: 27px; text-align: center; font-size: 11px; padding: 3px 0; background: #f8fafc; }
table.sheet th.dh small { display: block; font-weight: 500; color: #94a3b8; font-size: 9px; }
table.sheet th.dh.sun, table.sheet th.dh.hol { background: #f3e8ff; }
table.sheet td.dc { min-width: 27px; height: 30px; text-align: center; font-weight: 700; font-size: 10.5px; cursor: pointer; }
table.sheet td.dc:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
table.sheet td.dc.P { background: #dcfce7; color: #166534; } table.sheet td.dc.A { background: #fecaca; color: #b91c1c; } table.sheet td.dc.LT { background: #fef3c7; color: #92400e; } table.sheet td.dc.HF { background: #ffedd5; color: #9a3412; }
table.sheet td.dc.LV { background: #dbeafe; color: #1d4ed8; } table.sheet td.dc.HL { background: #f3e8ff; color: #6b21a8; } table.sheet td.dc.OF { background: #eef0f3; color: #6b7280; } table.sheet td.dc.NE { background: repeating-linear-gradient(45deg, #fff, #fff 3px, #f1f5f9 3px, #f1f5f9 6px); cursor: default; }
table.sheet .nm { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; max-width: 170px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 2px solid var(--line); }
table.sheet thead .nm { background: #f8fafc; z-index: 2; }
table.sheet .nm small { display: block; color: var(--muted); font-size: 10.5px; }
table.sheet .tt { min-width: 30px; text-align: center; font-weight: 700; padding: 0 3px; background: #fafbfc; }
.tablewrap { overflow-x: auto; }

/* payroll */
.steps { display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }
.step { padding: 5px 12px; border-radius: 99px; background: #f1f5f9; color: #64748b; font-size: 13px; font-weight: 600; }
.step.on { background: var(--brand); color: #fff; }
.step.done { background: #dcfce7; color: #166534; }

/* print */
#print { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
.a4-head img { width: 60px; height: 60px; object-fit: contain; }
.a4-head h1 { font-size: 20px; margin: 0; }
.a4-head h2 { margin-left: auto; font-size: 18px; }
.a4 h3 { margin: 14px 0 6px; }
.a4 .kv > :nth-child(odd) { color: #333; font-weight: 600; }
.a4 th { background: #eee; text-align: left; }
.a4 th.right, .a4 td.right { text-align: right; }
.a4 tr.tot td { font-weight: 700; background: #f5f5f5; }
.a4 table.sm td, .a4 table.sm th { font-size: 11px; padding: 3px 4px; }
.a4 table.xs td, .a4 table.xs th { font-size: 8.5px; padding: 2px 1px; text-align: center; }
.a4 table.xs td:nth-child(2), .a4 table.xs th:nth-child(2) { text-align: left; white-space: nowrap; }
.a4.wide { max-width: none; }
.pb { page-break-after: always; }
.slip-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 14px; margin: 10px 0; font-size: 12.5px; }
.slip-info span { display: block; color: #666; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; }
.slip-net { margin-top: 12px; border: 2px solid #000; padding: 8px 12px; }
.slip-net > div:first-child { display: flex; justify-content: space-between; align-items: baseline; }
.slip-net span { font-weight: 700; letter-spacing: .5px; } .slip-net b { font-size: 20px; }
.idcards { display: grid; grid-template-columns: repeat(2, 86mm); gap: 5mm 6mm; justify-content: center; }
.idc { width: 85.6mm; height: 54mm; border-radius: 3.5mm; border: 0.3mm solid #9ca3af; overflow: hidden; position: relative; background: #fff; font-family: Arial, sans-serif; color: #111827; break-inside: avoid; }
.idc-band { background: #1f2937; color: #fff; display: flex; align-items: center; gap: 2.5mm; padding: 2mm 3mm; border-bottom: 1mm solid #fb7185; }
.idc-band img { width: 8mm; height: 8mm; border-radius: 1.5mm; background: #fff; object-fit: contain; }
.idc-band b { font-size: 11px; line-height: 1.1; }
.idc-band.small { padding: 1.5mm 3mm; } .idc-band.small b { font-size: 9.5px; }
.idc-body { display: flex; gap: 3.5mm; padding: 3mm 3.5mm; }
.idc-ph { width: 22mm; height: 27mm; object-fit: cover; border-radius: 2mm; border: 0.3mm solid #cbd5e1; flex: 0 0 auto; background: #f1f5f9; }
.idc-ini { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #be123c; }
.idc-t { min-width: 0; }
.idc-name { font-size: 13px; font-weight: 800; line-height: 1.15; margin-bottom: 1mm; }
.idc-role { font-size: 10.5px; font-weight: 700; color: #be123c; } .idc-dep { font-size: 10px; color: #475569; margin-bottom: 2mm; } .idc-id { font-size: 10.5px; }
.idc-foot { position: absolute; left: 0; right: 0; bottom: 0; background: #be123c; color: #fff; text-align: center; font-size: 8px; letter-spacing: 1.5px; padding: 1mm 0; font-weight: 700; }
.idc-rows { padding: 2mm 3.5mm; font-size: 9.5px; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2mm 3mm; }
.idc-rows span { display: block; font-size: 7.5px; color: #64748b; text-transform: uppercase; }
.idc-ret { position: absolute; left: 3.5mm; right: 3.5mm; bottom: 9mm; font-size: 8px; color: #475569; border-top: 0.2mm dashed #94a3b8; padding-top: 1mm; }
.idc-sign { position: absolute; right: 3.5mm; bottom: 2mm; font-size: 7.5px; color: #475569; }
@media (max-width: 820px) {
  .tablewrap table.attgrid { min-width: 0; }
  .attgrid thead { display: none; }
  .attgrid, .attgrid tbody { display: block; }
  .attgrid tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .attgrid td { display: block; padding: 0 !important; border: 0 !important; }
  .attgrid td:first-child { flex: 1 1 100%; }
  .attgrid td:nth-child(2) { flex: 1 1 100%; }
  .attgrid input.tin { width: 100px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  #topActions { flex: 1 1 100%; order: 9; flex-wrap: wrap; }
  #topActions .btn { flex: 1; }
  .tablewrap table { min-width: 620px; font-size: 13.5px; }
  table.sheet { min-width: 0; font-size: 12px; }
  .tablewrap td, .tablewrap th { padding: 8px 8px; }
  table.sheet td, table.sheet th { padding: 0; }
  table.sheet .nm { padding: 4px 6px; min-width: 110px; }
  .attgrid input.tin { width: 96px; }
  .grid[style*="repeat(auto-fill"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stat .val { font-size: 19px; }
  .row > select, .row > input { flex: 1 1 100%; max-width: none; }
  .slip-info { grid-template-columns: repeat(2, 1fr); }
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
