/* Employee portal: opened on a phone, usually standing up, usually in a hurry. */
:root {
  --p-brand: #1f6feb;
  --p-ink: #14181f;
  --p-ink-2: #5a6675;
  --p-line: #e4e8ee;
  --p-bg: #f4f6f9;
  --p-ok: #1a7f4b;
  --p-warn: #b56b00;
  --p-bad: #c0392b;
  --p-info: #5a4fcf;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 5rem;
}

a { color: var(--p-brand); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .7rem; }
.muted { color: var(--p-ink-2); }
.small { font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }

/* Header ---------------------------------------------------------------------------- */
.p-head {
  background: #101725; color: #fff; padding: 1.1rem 1.1rem 1.3rem;
  border-radius: 0 0 18px 18px;
}
.p-head__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.p-head__name { font-size: 1.15rem; font-weight: 650; }
.p-head__meta { font-size: .82rem; color: #9fb0c9; }
.p-head a { color: #9fb0c9; font-size: .85rem; }
.p-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #2b3a52; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  flex: 0 0 auto;
}

/* Content --------------------------------------------------------------------------- */
.p-wrap { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
.p-card {
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px;
  padding: 1rem; margin-top: 1rem;
}
.p-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.p-card__head h2 { margin: 0; }

.p-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: 1rem; }
.p-stat { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: .8rem .9rem; }
.p-stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--p-ink-2); font-weight: 650; }
.p-stat__value { font-size: 1.5rem; font-weight: 680; font-variant-numeric: tabular-nums; line-height: 1.2; }
.p-stat--ok .p-stat__value { color: var(--p-ok); }
.p-stat--warn .p-stat__value { color: var(--p-warn); }
.p-stat--bad .p-stat__value { color: var(--p-bad); }

/* Calendar -------------------------------------------------------------------------- */
.p-month { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.p-month__title { font-weight: 650; text-transform: capitalize; }
.p-nav { background: #eef1f5; border: none; border-radius: 8px; padding: .4rem .7rem;
         font-size: 1rem; cursor: pointer; color: var(--p-ink); text-decoration: none; }
.p-nav[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.p-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.p-cal th { font-size: .68rem; color: var(--p-ink-2); font-weight: 650; padding-bottom: .4rem;
            text-transform: uppercase; letter-spacing: .04em; }
.p-cal td { padding: 2px; vertical-align: top; }
.p-day {
  aspect-ratio: 1; border-radius: 10px; padding: .25rem; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: #f7f8fa; border: 1px solid transparent;
}
.p-day__num { font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-day__dot { width: 6px; height: 6px; border-radius: 50%; }
.p-day--today { border-color: var(--p-brand); }
.p-day--future { opacity: .35; }
.p-day--ok   { background: #e6f5ec; } .p-day--ok .p-day__dot   { background: var(--p-ok); }
.p-day--warn { background: #fdf3e2; } .p-day--warn .p-day__dot { background: var(--p-warn); }
.p-day--bad  { background: #fdeceb; } .p-day--bad .p-day__dot  { background: var(--p-bad); }
.p-day--info { background: #eeecfb; } .p-day--info .p-day__dot { background: var(--p-info); }

.p-legend { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .8rem; font-size: .78rem; color: var(--p-ink-2); }
.p-legend span { display: flex; align-items: center; gap: .3rem; }
.p-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Badges, forms, buttons ------------------------------------------------------------ */
.p-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px;
           font-size: .75rem; font-weight: 650; background: #eef1f5; color: var(--p-ink-2); }
.p-badge--ok { background: #e6f5ec; color: var(--p-ok); }
.p-badge--warn { background: #fdf3e2; color: var(--p-warn); }
.p-badge--bad { background: #fdeceb; color: var(--p-bad); }
.p-badge--info { background: #eeecfb; color: var(--p-info); }

.p-alert { padding: .75rem .9rem; border-radius: 10px; margin-top: 1rem; font-size: .9rem; }
.p-alert--ok { background: #e6f5ec; color: var(--p-ok); }
.p-alert--bad { background: #fdeceb; color: var(--p-bad); }
.p-alert--info { background: #e8f0fe; color: #1a5fd0; }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--p-ink-2); margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; padding: .7rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--p-line); border-radius: 10px; background: #fff; color: var(--p-ink);
}
input[type=file] { padding: .5rem; font-size: .85rem; }
textarea { min-height: 80px; resize: vertical; }
.p-field { margin-bottom: .8rem; }
.p-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; padding: .8rem; font-size: 1rem; font-weight: 650; font-family: inherit;
  border: none; border-radius: 10px; background: var(--p-brand); color: #fff; cursor: pointer;
}
.p-btn--ghost { background: #eef1f5; color: var(--p-ink); }
.p-btn--sm { width: auto; padding: .45rem .8rem; font-size: .85rem; }

/* Bottom navigation ----------------------------------------------------------------- */
.p-tabs {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--p-line); display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.p-tab {
  flex: 1; padding: .6rem .2rem .7rem; text-align: center; color: var(--p-ink-2);
  font-size: .7rem; font-weight: 600; text-decoration: none;
}
.p-tab span { display: block; font-size: 1.25rem; line-height: 1.3; }
.p-tab--active { color: var(--p-brand); }

.p-list { list-style: none; margin: 0; padding: 0; }
.p-list li { padding: .8rem 0; border-bottom: 1px solid var(--p-line); }
.p-list li:last-child { border-bottom: none; }

.p-empty { text-align: center; padding: 2rem 1rem; color: var(--p-ink-2); }
.p-empty__icon { font-size: 2.2rem; display: block; margin-bottom: .4rem; opacity: .55; }

/* Login ----------------------------------------------------------------------------- */
.p-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center;
          padding: 1.2rem; background: linear-gradient(160deg, #101725, #1c2b45); }
.p-auth__card { background: #fff; border-radius: 16px; padding: 1.8rem; width: 100%; max-width: 380px; }

@media (min-width: 560px) {
  .p-stats { grid-template-columns: repeat(4, 1fr); }
}
