/* AtoZ Connect HRMS — custom styles, mobile-first + PWA */
:root { --brand:#4338CA; --brand-d:#3730a3; }
* { -webkit-tap-highlight-color: transparent; }
body { background:#f1f5f9; }

/* keep content clear of iOS notch + fixed bottom nav on phones */
@supports(padding:max(0px)) {
  body { padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right); }
}

.navbar-brand .dot { width:10px;height:10px;border-radius:50%;background:#10b981;display:inline-block;box-shadow:0 0 0 4px rgba(16,185,129,.25); }
.text-brand { color:var(--brand); }
.btn-brand { background:var(--brand); color:#fff; }
.btn-brand:hover { background:var(--brand-d); color:#fff; }

.avatar { border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.8rem;flex:none; }

.sidebar .list-group-item.active { background:var(--brand);border-color:var(--brand); }
.sidebar .list-group-item i { width:1.4rem; }

.clock-time { font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.02em; }
.selfie-preview, #cam { width:100%;max-width:280px;aspect-ratio:3/4;object-fit:cover;border-radius:14px;background:#000;transform:scaleX(-1); }

main { padding-bottom:1.5rem; }

/* larger touch targets on mobile */
@media (max-width:767.98px) {
  .list-group-item { padding-top:.85rem;padding-bottom:.85rem; }
  .btn { min-height:42px; }
  main { padding-bottom:5.5rem; }       /* room for the fixed bottom nav */
}

/* ---- mobile bottom navigation (app-like) ---- */
.bottomnav {
  background:#fff;border-top:1px solid #e2e8f0;
  padding-bottom:env(safe-area-inset-bottom);
  box-shadow:0 -2px 12px rgba(15,23,42,.06);
  z-index:1030;
}
.bottomnav .nav-link {
  flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:.45rem 0 .35rem;color:#64748b;font-size:.68rem;font-weight:600;line-height:1;
}
.bottomnav .nav-link i { font-size:1.25rem;line-height:1; }
.bottomnav .nav-link.active { color:var(--brand); }

/* install button pill */
#installBtn { display:none; }

/* make cards feel a touch more app-like */
.card { border:1px solid #e7ebf0; }

/* ---- payslip print ---- */
@media print {
  body * { visibility: hidden; }
  .payslip-print, .payslip-print * { visibility: visible; }
  .payslip-print { position: absolute; inset: 0; width: 100%; margin: 0; }
  .no-print { display: none !important; }
}

/* ---- mobile UI/UX polish ---- */
@media (max-width: 767.98px) {
  /* 16px inputs prevent iOS auto-zoom */
  .form-control, .form-select { font-size: 16px; }
  h5 { font-size: 1.1rem; }
  .display-5 { font-size: 2.4rem; }
  .card { border-radius: 14px; }
  .modal-fullscreen-sm-down .modal-header { position: sticky; top: 0; z-index: 5; }
  .modal-fullscreen-sm-down .modal-footer { position: sticky; bottom: 0; background: #fff; }
  .table-responsive { font-size: .9rem; }
  .list-group-item .btn-sm { padding: .35rem .5rem; }
}
/* tap feedback on nav + buttons */
.bottomnav .nav-link:active, .list-group-item-action:active, .btn:active { transform: scale(.98); }
.list-group-item-action { transition: background .12s ease; }
/* stat tiles tighten on small screens */
@media (max-width: 575.98px) { .h3 { font-size: 1.4rem; } .h4 { font-size: 1.2rem; } }

/* ---- org hierarchy tree ---- */
.org-tree, .org-tree ul { list-style: none; margin: 0; padding-left: 0; }
.org-tree ul { padding-left: 1.1rem; margin-left: .55rem; border-left: 2px solid var(--bs-border-color, #dee2e6); }
.org-tree li { position: relative; padding: .25rem 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: -1.1rem; top: 1.35rem; width: .9rem; height: 2px; background: var(--bs-border-color, #dee2e6); }
.org-card { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 12px; padding: .5rem .65rem; background: #fff; }
.org-card.org-me { border-color: #4338CA; box-shadow: 0 0 0 2px rgba(67,56,202,.12); }
.min-w-0 { min-width: 0; }

/* ---- tabbed member form ---- */
.member-tabs { gap: .3rem; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.member-tabs::-webkit-scrollbar { height: 0; }
.member-tabs .nav-link { padding: .4rem .8rem; font-size: .85rem; white-space: nowrap; border-radius: 9px; color: var(--bs-secondary-color, #6c757d); }
.member-tabs .nav-link.active { background: #4338CA; color: #fff; }
.modal-lg .modal-body { padding-top: 1rem; }
.tab-pane .row > [class^="col"] { margin-bottom: .15rem; }

/* ---- professional login ---- */
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-brand { position: relative; color: #fff; padding: 3rem; display: flex; align-items: center; overflow: hidden;
  background: linear-gradient(135deg, #312e81 0%, #4338CA 45%, #0891B2 100%); }
.login-brand::after { content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: radial-gradient(circle at 20% 20%, #fff 1.5px, transparent 1.6px); background-size: 26px 26px; }
.login-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.login-logo { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; letter-spacing: -1px; margin-bottom: 1.5rem; }
.login-logo span { color: #5eead4; }
.login-logo.sm { width: 38px; height: 38px; font-size: 1rem; border-radius: 11px; background: linear-gradient(135deg,#4338CA,#0891B2); margin: 0; }
.login-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -.5px; margin-bottom: .5rem; }
.login-tag { color: rgba(255,255,255,.82); font-size: 1.02rem; line-height: 1.6; margin-bottom: 2rem; }
.login-feats { list-style: none; padding: 0; margin: 0 0 2rem; }
.login-feats li { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; color: rgba(255,255,255,.92); font-size: .95rem; }
.login-feats i { color: #5eead4; font-size: 1.1rem; line-height: 1.4; }
.login-foot { color: rgba(255,255,255,.6); font-size: .8rem; }
.login-form-col { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #f8fafc; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 2.5rem; box-shadow: 0 12px 40px rgba(2,6,23,.10); }
.login-mobilebrand { display: none; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.login-card .input-group-text { background: #f1f5f9; border-right: 0; color: #64748b; }
.login-card .form-control { border-left: 0; }
.login-card .input-group .form-control:focus { box-shadow: none; border-color: #cbd5e1; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-mobilebrand { display: flex; }
  .login-card { box-shadow: 0 6px 24px rgba(2,6,23,.08); padding: 1.75rem; }
}

/* ---- public onboarding page ---- */
.onboard-page { min-height: 100vh; background: #f8fafc; padding: 2rem 1rem; }
.onboard-card { max-width: 760px; margin: 0 auto; border-radius: 18px; }
@media (max-width: 575.98px) { .onboard-page { padding: 0; } .onboard-card { border-radius: 0; min-height: 100vh; } }

/* ---- attendance daily/weekly/monthly views ---- */
.att-views .nav-link { padding: .3rem .9rem; font-size: .85rem; border-radius: 8px; color: var(--bs-secondary-color, #6c757d); }
.att-views .nav-link.active { background: #4338CA; color: #fff; }
.att-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.att-cell { min-height: 56px; border-radius: 8px; padding: 5px 6px; border: 1px solid rgba(2,6,23,.05); }
.att-cell-day { font-weight: 600; font-size: .82rem; }
.att-cell-h { font-size: .68rem; color: #475569; }
.att-today { outline: 2px solid #4338CA; outline-offset: -2px; }
.att-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: middle; border: 1px solid rgba(2,6,23,.06); }
@media (max-width: 575.98px) { .att-cell { min-height: 46px; padding: 3px; } .att-cell-day { font-size: .72rem; } .att-cell-h { font-size: .6rem; } }