/* ============================================================
   PREMIERE GROUP — User App (mobile) layout
   ============================================================ */

.pg-user {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: #0F3A48; /* frame gutter on wide screens */
}

.pg-user__frame {
  width: 100%;
  max-width: var(--pg-user-max-w);
  background: var(--pg-bg);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,.25);
}

/* ---------- Screen scroll area ---------- */
.pg-user__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--pg-user-bottomnav-h) + var(--pg-s-6));
}

/* ---------- Header ---------- */
.pg-uheader {
  background: linear-gradient(135deg, var(--pg-blue) 0%, var(--pg-blue-700) 100%);
  color: #fff;
  padding: var(--pg-s-6) var(--pg-s-5) var(--pg-s-6);
}
.pg-uheader--tight { padding-bottom: var(--pg-s-5); }
.pg-uheader__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pg-s-3);
}
.pg-uheader__brand { display: flex; align-items: center; gap: var(--pg-s-2); font-weight: 700; letter-spacing: .12em; font-size: var(--pg-fs-sm); }
.pg-uheader__brand small { display:block; font-weight: 500; letter-spacing:.18em; opacity:.8; font-size: 10px; }
.pg-uheader__title { font-size: var(--pg-fs-lg); font-weight: 700; }
.pg-uheader__greeting { margin-top: var(--pg-s-4); }
.pg-uheader__hello { font-size: var(--pg-fs-sm); opacity: .9; }
.pg-uheader__name { font-size: var(--pg-fs-xl); font-weight: 700; margin-top: 2px; }
.pg-uheader__sub { font-size: var(--pg-fs-sm); opacity: .85; margin-top: 4px; }
.pg-uheader__iconbtn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center; color: #fff;
  position: relative;
}
.pg-uheader__iconbtn .pg-dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pg-yellow); border: 2px solid var(--pg-blue-700);
}

/* ---------- Content wrapper ---------- */
.pg-uscreen { padding: var(--pg-s-5); display: flex; flex-direction: column; gap: var(--pg-s-4); }
.pg-uscreen--pull { margin-top: calc(var(--pg-s-6) * -1); }

/* ---------- Section title in screen ---------- */
.pg-usection-title { font-size: var(--pg-fs-md); font-weight: 700; margin-top: var(--pg-s-2); }

/* ---------- Segmented control (in-screen tabs) ---------- */
.pg-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--pg-surface-alt);
  border: 1px solid var(--pg-border);
  border-radius: 999px;
}
.pg-seg__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: var(--pg-fs-sm);
  color: var(--pg-text-secondary);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.pg-seg__btn svg { width: 15px; height: 15px; }
.pg-seg__btn.is-active {
  background: var(--pg-blue);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
}

/* ---------- Quick access grid ---------- */
.pg-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--pg-s-3);
}
.pg-quick__item {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-r-md);
  padding: var(--pg-s-4) var(--pg-s-2);
  display: flex; flex-direction: column; align-items: center; gap: var(--pg-s-2);
  text-align: center;
  font-size: var(--pg-fs-xs);
  font-weight: 600;
  color: var(--pg-text);
}
.pg-quick__ic {
  width: 40px; height: 40px; border-radius: var(--pg-r-md);
  background: var(--pg-blue-050); color: var(--pg-blue);
  display: grid; place-items: center;
}
.pg-quick__ic svg { width: 20px; height: 20px; }

/* ---------- Mini stat pair ---------- */
.pg-ministat {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-r-md);
  padding: var(--pg-s-4);
}
.pg-ministat__label { font-size: var(--pg-fs-xs); color: var(--pg-text-secondary); display:flex; align-items:center; gap:6px; }
.pg-ministat__value { font-size: var(--pg-fs-xl); font-weight: 700; margin-top: 4px; }
.pg-ministat__cap { font-size: var(--pg-fs-xs); color: var(--pg-text-muted); }
.pg-ministat__link { font-size: var(--pg-fs-xs); font-weight: 600; color: var(--pg-blue); margin-top: var(--pg-s-2); display:inline-flex; align-items:center; gap:4px; }

/* ---------- Status absensi card ---------- */
.pg-attn-card { text-align: center; }
.pg-attn-card__ic {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--pg-blue-050); color: var(--pg-blue);
  display: grid; place-items: center; margin: 0 auto var(--pg-s-3);
}
.pg-attn-card__state { font-weight: 700; color: var(--pg-warning); font-size: var(--pg-fs-md); }
.pg-attn-card__hint { font-size: var(--pg-fs-sm); color: var(--pg-text-secondary); margin-top: 4px; }

/* ---------- Work hours strip ---------- */
.pg-workhours {
  display: flex;
  align-items: center;
  background: var(--pg-surface-alt);
  border-radius: var(--pg-r-md);
  padding: var(--pg-s-4);
  gap: var(--pg-s-4);
}
.pg-workhours__ic { color: var(--pg-blue); flex: none; }
.pg-workhours__col { flex: 1; text-align: center; }
.pg-workhours__col + .pg-workhours__col { border-left: 1px solid var(--pg-border); }
.pg-workhours__t { font-size: var(--pg-fs-lg); font-weight: 700; }
.pg-workhours__l { font-size: var(--pg-fs-xs); color: var(--pg-text-secondary); }
.pg-workhours__note { flex-basis: 100%; text-align: center; font-size: var(--pg-fs-xs); color: var(--pg-text-muted); }

/* ---------- Todo list item (mobile) — compact ---------- */
.pg-todo-item {
  background: var(--pg-surface);
  border: 1px solid var(--pg-border);
  border-left: 3px solid var(--pg-border);
  border-radius: var(--pg-r-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
  width: 100%;
}
.pg-todo-item--high { border-left-color: var(--pg-prio-high); }
.pg-todo-item--mid  { border-left-color: var(--pg-prio-mid); }
.pg-todo-item--low  { border-left-color: var(--pg-prio-low); }
.pg-todo-item__head { display: flex; align-items: center; gap: 7px; }
.pg-todo-item__title {
  font-weight: 600; font-size: 13.5px;
  display: flex; gap: 7px; align-items: center;
  flex: 1; min-width: 0;
}
.pg-todo-item__title > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-todo-item__title > svg { width: 15px; height: 15px; flex: none; color: var(--pg-text-secondary); }
.pg-todo-item__head > svg { width: 16px; height: 16px; flex: none; color: var(--pg-text-muted); }
.pg-todo-item__note {
  font-size: 11.5px; color: var(--pg-text-muted);
  display: flex; gap: 5px; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-todo-item__note svg { width: 12px; height: 12px; flex: none; }
.pg-todo-item__note span { overflow: hidden; text-overflow: ellipsis; }
.pg-todo-item__foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--pg-text-muted);
}
.pg-todo-item__foot .pg-badge { font-size: 10px; padding: 1px 7px; }
.pg-todo-item__foot span { font-variant-numeric: tabular-nums; }
/* legacy meta classes kept for any other caller */
.pg-todo-item__meta { display: flex; gap: var(--pg-s-6); }
.pg-todo-item__meta-l { font-size: var(--pg-fs-xs); color: var(--pg-text-muted); }
.pg-todo-item__meta-v { font-size: var(--pg-fs-sm); font-weight: 600; display:flex; align-items:center; gap:6px; }

/* ---------- Riwayat row ---------- */
.pg-history-row {
  display: flex; align-items: center; gap: var(--pg-s-3);
  padding: var(--pg-s-3) 0;
  border-top: 1px solid var(--pg-border);
}
.pg-history-row:first-child { border-top: 0; }
.pg-history-row__ic { width: 36px; height: 36px; border-radius: var(--pg-r-sm); background: var(--pg-surface-alt); display:grid; place-items:center; color: var(--pg-text-secondary); flex:none; }
.pg-history-row__main { flex: 1; }
.pg-history-row__d { font-size: var(--pg-fs-sm); font-weight: 600; }
.pg-history-row__t { font-size: var(--pg-fs-xs); color: var(--pg-text-secondary); }

/* ---------- KPI summary rows ---------- */
.pg-kpi-row { display: flex; flex-direction: column; gap: 6px; padding: var(--pg-s-3) 0; border-top: 1px solid var(--pg-border); }
.pg-kpi-row:first-child { border-top: 0; }
.pg-kpi-row__top { display: flex; justify-content: space-between; font-size: var(--pg-fs-sm); }
.pg-kpi-row__pct { font-weight: 700; }

/* ---------- Bottom navigation ---------- */
.pg-bottomnav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--pg-user-bottomnav-h);
  background: var(--pg-surface);
  border-top: 1px solid var(--pg-border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.pg-bottomnav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--pg-text-muted);
  position: relative;
}
.pg-bottomnav__item svg { width: 22px; height: 22px; }
.pg-bottomnav__item.is-active { color: var(--pg-blue); }
.pg-bottomnav__item.is-active::before {
  content: "";
  position: absolute; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pg-yellow);
  right: calc(50% - 18px);
}

/* ---------- FAB ---------- */
.pg-fab {
  position: absolute;
  right: 50%;
  transform: translateX(calc(var(--pg-user-max-w) / 2 - 50%));
  bottom: calc(var(--pg-user-bottomnav-h) - 26px);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--pg-yellow);
  color: #4A3B00;
  display: grid; place-items: center;
  box-shadow: var(--pg-shadow-lg);
  z-index: 25;
}
@media (max-width: 480px) {
  .pg-fab { right: var(--pg-s-5); transform: none; }
}

/* ---------- Login ---------- */
.pg-ulogin {
  flex: 1;
  min-height: 100%;
  width: 100%;
  overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pg-s-6);
  gap: var(--pg-s-6);
  background: linear-gradient(160deg, var(--pg-blue) 0%, var(--pg-blue-700) 60%, #0F3A48 100%);
  color: #fff;
}
.pg-ulogin__brand { text-align: center; }
.pg-ulogin__logo {
  width: 64px; height: 64px; border-radius: var(--pg-r-lg);
  background: rgba(255,255,255,.12); display:grid; place-items:center;
  margin: 0 auto var(--pg-s-4);
}
.pg-ulogin__logo svg { width: 34px; height: 34px; }
.pg-ulogin__name { font-size: var(--pg-fs-xl); font-weight: 800; letter-spacing: .12em; }
.pg-ulogin__tag { font-size: var(--pg-fs-xs); letter-spacing: .22em; opacity: .8; }
.pg-ulogin__card {
  background: var(--pg-surface);
  color: var(--pg-text);
  border-radius: var(--pg-r-lg);
  padding: var(--pg-s-6);
  display: flex; flex-direction: column; gap: var(--pg-s-4);
  box-shadow: var(--pg-shadow-lg);
}
.pg-ulogin__error { color: var(--pg-danger); font-size: var(--pg-fs-sm); }
.pg-ulogin__foot { text-align: center; font-size: var(--pg-fs-xs); opacity: .8; }
.pg-ulogin__foot a { color: var(--pg-yellow); }
