:root {
  --lw-bg: #f0fdfa;
  --lw-ink: #134e4a;
  --lw-accent: #0f766e;
  --lw-accent-2: #14b8a6;
  --lw-card: #fff;
  --lw-tab: #0f766e;
  --lw-muted: #64748b;
  --lw-line: #e2e8f0;
  --lw-soft: #ecfdf5;
  --lw-radius: 1rem;
  --lw-shadow: 0 6px 18px rgba(15, 118, 110, .08);
  --lw-shadow-lg: 0 12px 32px rgba(15, 118, 110, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.labour-shell {
  margin: 0;
  background:
    radial-gradient(ellipse 120% 40% at 50% -10%, rgba(45, 212, 191, .22), transparent 55%),
    linear-gradient(180deg, #ccfbf1 0%, var(--lw-bg) 28%, #f8fafc 100%);
  color: var(--lw-ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.pwa-standalone.labour-shell {
  padding-top: env(safe-area-inset-top);
}
.labour-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem;
  padding-top: max(.7rem, env(safe-area-inset-top));
  background: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
  color: #ecfdf5;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(4, 47, 46, .18);
}
.labour-brand { font-weight: 700; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .5rem; }
.labour-brand > i { font-size: 1.15rem; }
.labour-brand-logo {
  width: 1.85rem; height: 1.85rem; object-fit: contain; border-radius: .45rem;
  background: #fff; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.labour-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.labour-brand-main { font-size: .95rem; }
.labour-brand-tenant {
  font-size: .65rem; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .04em;
}
.labour-top-actions { display: flex; align-items: center; gap: .4rem; }
.labour-icon-btn {
  width: 2.1rem; height: 2.1rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: .55rem !important;
}
.labour-logout-btn { display: inline-flex; align-items: center; border-radius: .55rem !important; }
.labour-main {
  padding: 1rem .9rem 1.25rem;
  max-width: 720px; margin: 0 auto;
  animation: lwFadeIn .28s ease-out;
}
@keyframes lwFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.labour-main-auth {
  max-width: 420px; padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom));
  margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
}
body.labour-auth-page { padding-bottom: 0; }
.login-shell { width: 100%; }

.lw-page-head { margin-bottom: 1rem; }
.lw-page-head h1, .lw-page-head .h4 {
  font-weight: 800; letter-spacing: -.02em; margin-bottom: .2rem;
}
.lw-page-head .lead-muted {
  color: var(--lw-muted); font-size: .88rem; margin: 0;
}

.labour-subnav {
  position: sticky; top: 3.2rem; z-index: 35;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--lw-line);
  padding: .5rem .75rem .55rem;
  box-shadow: 0 4px 14px rgba(15, 118, 110, .06);
  backdrop-filter: blur(8px);
}
.labour-subnav-label {
  font-size: .68rem; font-weight: 700; color: var(--lw-muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: .35rem;
}
.labour-subnav-label i { color: var(--lw-accent); margin-right: .2rem; }
.labour-subnav-scroll {
  display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: .15rem; scrollbar-width: none;
}
.labour-subnav-scroll::-webkit-scrollbar { display: none; }
.labour-subnav-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .42rem .75rem; border-radius: 999px;
  border: 1px solid #ccfbf1; background: var(--lw-soft);
  color: var(--lw-ink); text-decoration: none;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s;
}
.labour-subnav-chip:active { transform: scale(.97); }
.labour-subnav-chip i { font-size: .9rem; color: var(--lw-accent); }
.labour-subnav-chip.active {
  background: var(--lw-accent); color: #ecfdf5; border-color: var(--lw-accent);
  box-shadow: 0 4px 12px rgba(15, 118, 110, .25);
}
.labour-subnav-chip.active i { color: #ecfdf5; }

.labour-fs-bar {
  position: sticky; top: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .75rem;
  padding-top: max(.55rem, env(safe-area-inset-top));
  background: #042f2e; color: #ecfdf5;
}
.labour-fs-home, .labour-fs-exit {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid rgba(236, 253, 245, .35); background: transparent; color: #ecfdf5;
  border-radius: .55rem; padding: .35rem .6rem; font-size: .78rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.labour-fs-title { font-weight: 700; font-size: .9rem; flex: 1; text-align: center; }

body.labour-fs .labour-top,
body.labour-fs .labour-tabbar { display: none !important; }
body.labour-fs { padding-bottom: 0; }
body.labour-fs .labour-subnav { top: 2.7rem; }
body.labour-fs .labour-main { max-width: 960px; padding-top: .75rem; }

.labour-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: .15rem; justify-content: space-around; align-items: stretch;
  padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--lw-line);
  box-shadow: 0 -10px 28px rgba(15, 118, 110, .1);
  backdrop-filter: blur(10px);
}
.labour-tab, .labour-tab-more {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .12rem; text-decoration: none; color: var(--lw-muted); font-size: .62rem; font-weight: 600;
  background: none; border: 0; padding: .4rem .2rem; min-width: 0;
  border-radius: .75rem;
  transition: color .15s, background .15s;
}
.labour-tab i { font-size: 1.2rem; }
.labour-tab.active, .labour-tab:hover { color: var(--lw-tab); }
.labour-tab.active { background: var(--lw-soft); }
.labour-tab span { max-width: 4.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lw-card {
  background: var(--lw-card); border-radius: var(--lw-radius); padding: 1rem;
  border: 1px solid #d1fae5; margin-bottom: .75rem;
  box-shadow: var(--lw-shadow);
}
.lw-kpi {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem;
}
.lw-kpi .lw-card { margin: 0; text-align: center; }
.lw-kpi-tile {
  position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.lw-kpi-tile::after {
  content: ""; position: absolute; inset: auto -20% -40% auto;
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: rgba(15, 118, 110, .06); pointer-events: none;
}
.lw-kpi-tile:active { transform: scale(.98); }
.lw-kpi .v { font-size: 1.5rem; font-weight: 800; color: var(--lw-accent); letter-spacing: -.02em; }
.lw-kpi .l { font-size: .7rem; color: var(--lw-muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }

.lw-emp {
  display: flex; gap: .75rem; align-items: center; text-decoration: none; color: inherit;
}
.lw-avatar {
  width: 2.6rem; height: 2.6rem; border-radius: 999px; background: #ccfbf1; color: var(--lw-accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.lw-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.btn-labour {
  background: linear-gradient(135deg, var(--lw-accent-2), var(--lw-accent));
  border-color: var(--lw-accent); color: #fff;
  border-radius: .75rem; font-weight: 700;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .22);
}
.btn-labour:hover { background: #0d9488; border-color: #0d9488; color: #fff; }
.btn-outline-success, .btn-outline-secondary { border-radius: .7rem; }
.alert {
  border-radius: .85rem;
  border: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.login-hero { text-align: center; margin-bottom: 1.25rem; }
.login-hero-icon {
  width: 3.25rem; height: 3.25rem; margin: 0 auto .75rem;
  border-radius: 1rem; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0f766e, #042f2e); color: #ecfdf5;
  font-size: 1.4rem; box-shadow: 0 8px 24px rgba(15, 118, 110, .28);
}
.login-brand-logo {
  display: block; max-width: 11rem; height: auto; margin: 0 auto .85rem;
  filter: drop-shadow(0 6px 16px rgba(15, 118, 110, .18));
}
.login-hero h1 { font-size: 1.5rem; font-weight: 800; color: var(--lw-ink); margin-bottom: .25rem; letter-spacing: -.02em; }
.login-hero p { color: var(--lw-muted); font-size: .9rem; margin-bottom: 0; }
.login-card {
  margin-bottom: 0;
  border-color: #99f6e4;
  box-shadow: var(--lw-shadow-lg);
}
.login-card .input-group-text {
  background: #f0fdfa; border-color: #99f6e4; color: var(--lw-accent);
}
.login-card .form-control { border-color: #99f6e4; }
.login-card .form-control:focus {
  border-color: #0f766e; box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
}
.login-footnote code {
  font-size: .72rem; background: #ecfdf5; padding: .1rem .35rem; border-radius: .3rem;
}
.lw-tenant-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; border-radius: 999px;
  background: #ecfdf5; color: #0f766e; font-size: .8rem; font-weight: 600;
  border: 1px solid #99f6e4;
}
.labour-more-title {
  font-size: .95rem; font-weight: 700; margin-bottom: .85rem; color: var(--lw-ink);
}

.labour-more-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, .45);
}
.labour-more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  max-height: min(78dvh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 1.1rem 1.1rem 0 0;
  padding: .5rem 1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(15, 118, 110, .18);
  animation: labourSheetUp .22s ease-out;
}
@keyframes labourSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.labour-more-handle {
  width: 2.5rem; height: .28rem; border-radius: 99px; background: #cbd5e1;
  margin: .35rem auto .75rem;
}
.labour-more-module { margin-bottom: 1rem; }
.labour-more-module-title {
  font-size: .78rem; font-weight: 700; color: #64748b; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: .45rem;
}
.labour-more-module-title i { color: var(--lw-accent); margin-right: .25rem; }
.labour-more-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem;
}
.labour-more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .35rem; text-align: center; text-decoration: none; color: var(--lw-ink);
  background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: .85rem;
  padding: .75rem .35rem; min-height: 4.5rem; font-size: .72rem; font-weight: 600;
  transition: transform .12s, background .15s;
}
.labour-more-item:active { transform: scale(.97); }
.labour-more-item i { font-size: 1.25rem; color: var(--lw-accent); }
.labour-more-item.active { background: #0f766e; color: #ecfdf5; border-color: #0f766e; }
.labour-more-item.active i { color: #ecfdf5; }
body.manual-entry-open .labour-tabbar { display: none; }
body.manual-entry-open { padding-bottom: 0; }

.pay-mobile-card {
  display: block; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, #fff 0%, #f8fffc 100%);
  border: 1px solid #ccfbf1; border-radius: 1.1rem;
  padding: .9rem; margin-bottom: .7rem;
  box-shadow: 0 6px 18px rgba(15, 118, 110, .08);
  transition: transform .12s ease, box-shadow .12s ease;
}
.pay-mobile-card:active { transform: scale(.985); box-shadow: 0 2px 8px rgba(15, 118, 110, .1); }
.pay-mobile-top {
  display: flex; gap: .7rem; align-items: center; margin-bottom: .65rem;
}
.pay-mobile-top img {
  width: 3.1rem; height: 3.1rem; border-radius: 999px; object-fit: cover; flex-shrink: 0;
  background: #ccfbf1; border: 2px solid #99f6e4;
}
.pay-mobile-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem;
}
.pay-metric {
  text-align: center; background: #f0fdfa; border: 1px solid #ccfbf1;
  border-radius: .65rem; padding: .45rem .15rem;
}
.pay-metric .n { display: block; font-weight: 700; font-size: .88rem; color: var(--lw-ink); line-height: 1.2; }
.pay-metric .t { font-size: .58rem; color: #64748b; text-transform: uppercase; letter-spacing: .02em; }
.pay-metric.ot { background: #ecfdf5; border-color: #a7f3d0; }
.pay-metric.ot .n { color: #059669; }
.pay-metric.lop, .pay-metric.late { background: #fff7ed; border-color: #fed7aa; }
.pay-metric.lop .n, .pay-metric.late .n { color: #c2410c; }
.pay-metric.net .n { color: var(--lw-accent); }
.pay-status-pill {
  font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px;
  background: #ecfdf5; color: #0f766e; border: 1px solid #99f6e4; white-space: nowrap;
}
.pay-card-net {
  margin-top: .65rem; padding-top: .55rem; border-top: 1px dashed #99f6e4;
  display: flex; justify-content: space-between; align-items: center;
}
.pay-card-net .amt {
  font-size: 1.05rem; font-weight: 800; color: #0f766e;
}
.pay-day-card .badge-present { background: #d1fae5; color: #065f46; }
.pay-day-card .badge-late { background: #ffedd5; color: #9a3412; }
.pay-day-card .badge-absent { background: #fee2e2; color: #991b1b; }
.pay-day-card .badge-leave { background: #e0e7ff; color: #3730a3; }
.pay-day-card .badge-lop { background: #fecaca; color: #7f1d1d; }
.pay-day-card .badge-half { background: #fef3c7; color: #92400e; }
.pay-day-card .badge-off { background: #f1f5f9; color: #475569; }
.pay-sum-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .65rem;
}
.pay-sum-item {
  background: #f8fafc; border-radius: .55rem; padding: .4rem; text-align: center;
}
.pay-sum-item span { display: block; font-size: .6rem; color: #64748b; text-transform: uppercase; }
.pay-sum-item strong { font-size: .85rem; }

.lw-dash-head { margin-bottom: .35rem; }
.lw-eyebrow {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--lw-accent); margin-bottom: .2rem;
}
.lw-kpi-tile .l i { margin-right: .2rem; }
.lw-flow-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem;
}
.lw-flow-steps {
  list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0;
}
.lw-flow-steps li {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .55rem; border-radius: 999px;
  background: #ecfdf5; color: #0f766e; font-size: .72rem; font-weight: 600;
  border: 1px solid #99f6e4;
}
.lw-flow-steps .n {
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0f766e; color: #ecfdf5; font-size: .65rem;
}
.lw-flow-section-title {
  letter-spacing: .04em; font-size: .7rem !important;
  display: flex; align-items: center; gap: .4rem;
  margin-top: .15rem;
}
.lw-flow-num {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0f766e; color: #ecfdf5; font-size: .65rem; font-weight: 700;
}
.lw-flow-tile {
  display: flex; flex-direction: column; gap: .22rem;
  text-decoration: none; color: var(--lw-ink);
  background: #fff; border: 1px solid #d1fae5; border-radius: 1rem;
  padding: .9rem .8rem;
  box-shadow: var(--lw-shadow);
  min-height: 5.4rem;
  transition: transform .14s, border-color .14s, box-shadow .14s;
}
.lw-flow-tile:hover {
  border-color: #99f6e4;
  box-shadow: var(--lw-shadow-lg);
}
.lw-flow-tile:active { transform: scale(.98); }
.lw-flow-tile i {
  font-size: 1.4rem; color: var(--lw-accent); margin-bottom: .1rem;
}
.lw-flow-tile .t { font-weight: 750; font-size: .9rem; line-height: 1.2; }
.lw-flow-tile .d { font-size: .7rem; color: var(--lw-muted); line-height: 1.3; }
.lw-flow-tile.accent {
  background: linear-gradient(145deg, #0f766e, #042f2e);
  border-color: #0f766e; color: #ecfdf5;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .28);
}
.lw-flow-tile.accent i, .lw-flow-tile.accent .d { color: #99f6e4; }
.lw-flow-tile.accent .t { color: #ecfdf5; }

.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .55rem .45rem; }
.form-control, .form-select { border-radius: .7rem; }
.form-control:focus, .form-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .14);
}

@media (min-width: 768px) {
  .lw-kpi { grid-template-columns: repeat(4, 1fr); }
  .lw-flow-grid { grid-template-columns: repeat(4, 1fr); }
  body.labour-shell { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .labour-more-grid { grid-template-columns: repeat(4, 1fr); }
  .labour-main { padding: 1.15rem 1.25rem 1.5rem; }
}
