/* ============================================================
   PROFILE PAGE (redesign v3, 2026-10-12)
   Its own layout — a profile, not a second dashboard — on the shared
   theme: Inter, the dashboard's ink/emerald tokens, the same hero
   gradient, 16px cards and soft shadows. Everything is scoped to
   .profile-page; the dialogs (.pfm-*) live on <body>.
   ============================================================ */

.profile-page {
  --pf-ink: #0B1F17;
  --pf-ink-2: #2F3B36;
  --pf-muted: #61706A;
  --pf-faint: #98A39E;
  --pf-line: #E5E9E7;
  --pf-soft: #EFF2F1;
  --pf-tint: #F8FAF9;
  --pf-em: #059669;
  --pf-em-d: #047857;
  --pf-rose: #E11D48;
  --pf-amber: #D97706;
  --pf-radius: 16px;
  --pf-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 26px -16px rgba(16, 24, 40, 0.20);
  --pf-shadow-up: 0 2px 4px rgba(4, 47, 36, 0.05), 0 16px 34px -18px rgba(4, 47, 36, 0.38);
  --pf-max: 1320px;
  --pf-bleed: var(--page-gutter, 24px);
  color: var(--pf-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
/* Everything but the hero keeps the old 1320px column; the hero runs edge to edge. */
.profile-page > .pf-tabs, .profile-page > .pf-grid { max-width: var(--pf-max); margin-left: auto; margin-right: auto; }
.content:has(> .profile-page) {
  background:
    radial-gradient(500px 180px at 8% 0%, rgba(0, 168, 104, 0.08), transparent 65%),
    linear-gradient(135deg, #f4fbf6 0%, #f9fcfa 55%, #f1f7f3 100%);
  background-attachment: fixed;
}
.profile-page svg.lucide { width: 15px; height: 15px; }
.profile-page a { color: inherit; }
.profile-page .pf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Buttons, chips, pills ── */
.profile-page .pf-btn,
.pfm-overlay .pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 0; padding: 8px 14px;
  border: 1px solid var(--pf-line, #E5E9E7); border-radius: 10px;
  background: #fff; color: var(--pf-ink-2, #2F3B36);
  font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1.3;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, filter 0.15s;
}
.profile-page .pf-btn:hover, .pfm-overlay .pf-btn:hover { border-color: #C9D3CE; background: #FBFCFB; }
.profile-page .pf-btn:focus-visible, .pfm-overlay .pf-btn:focus-visible { outline: 2px solid #059669; outline-offset: 2px; }
.profile-page .pf-btn:disabled, .pfm-overlay .pf-btn:disabled { opacity: 0.6; cursor: default; }
.profile-page .pf-btn svg, .pfm-overlay .pf-btn svg { width: 14px; height: 14px; }
.profile-page .pf-btn--pri, .pfm-overlay .pf-btn--pri {
  border-color: #059669; background: linear-gradient(135deg, #10B981, #059669); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(5, 150, 105, 0.9);
}
.profile-page .pf-btn--pri:hover, .pfm-overlay .pf-btn--pri:hover { border-color: #047857; background: linear-gradient(135deg, #10B981, #047857); filter: brightness(1.02); }
.profile-page .pf-btn--sm, .pfm-overlay .pf-btn--sm { padding: 6px 11px; border-radius: 9px; font-size: 12px; }
.profile-page .pf-btn--icon { padding: 8px 9px; }
.pfm-overlay .pf-btn--danger { border-color: #FECDD3; background: #FFF1F2; color: #BE123C; }
.profile-page .pf-link { color: var(--pf-em-d); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.profile-page .pf-link:hover { text-decoration: underline; }
.profile-page .pf-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 3px 10px; border: 1px solid rgba(11, 143, 90, 0.14); border-radius: 999px;
  background: rgba(255, 255, 255, 0.78); color: var(--pf-ink-2);
  font-size: 11.5px; font-weight: 650; text-decoration: none;
}
.profile-page a.pf-chip:hover { border-color: rgba(11, 143, 90, 0.35); }
.profile-page .pf-chip svg { flex: 0 0 auto; width: 12px; height: 12px; }
.profile-page .pf-chip--ok { border-color: #A7F3D0; background: #ECFDF5; color: #047857; }
.profile-page .pf-chip--wait { border-color: #FDE68A; background: #FFFBEB; color: #B45309; }
.profile-page .pf-chip--muted { background: #F1F4F2; color: var(--pf-muted); }
.profile-page .pf-chip--vi { border-color: #E9D5FF; background: #F3E8FF; color: #7E22CE; }
.profile-page .pf-chip--am { border-color: #FDE68A; background: #FFFBEB; color: #B45309; }
.profile-page .pf-chip--or { border-color: #FED7AA; background: #FFEDD5; color: #C2410C; }
.profile-page .pf-pdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.profile-page .pf-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #F1F4F2; color: var(--pf-muted); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.profile-page .pf-pill--done { background: #ECFDF5; color: #047857; }
.profile-page .pf-pill--wait { background: #FFFBEB; color: #B45309; }
.profile-page .pf-pill--back { background: #FFF1F2; color: #BE123C; }
.profile-page .pf-pill--info { background: #E0F2FE; color: #0369A1; }

/* ── Hero ──
   Full-bleed band: touches the header and both sides of the content area (negative
   margins = the app gutter) and its gradient fades out at the bottom into the page,
   so the numbers strip sits on the seam. */
.profile-page .pf-hero {
  position: relative; isolation: isolate; overflow: visible;
  margin: calc(-1 * var(--pf-bleed)) calc(-1 * var(--pf-bleed)) 4px;
  padding: 0 var(--pf-bleed) 6px;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.profile-page .pf-hero::after {
  content: ""; position: absolute; inset: 0 0 -40px; z-index: -2; pointer-events: none;
  background:
    radial-gradient(circle at calc(100% + 60px) -60px, transparent 137px, rgba(11, 143, 90, 0.05) 138px 190px, transparent 191px),
    radial-gradient(620px 240px at 0% 0%, rgba(11, 143, 90, 0.20), transparent 68%),
    radial-gradient(620px 260px at 95% 0%, rgba(99, 102, 241, 0.14), transparent 66%),
    linear-gradient(112deg, #DDF1E5 0%, #EAF7EF 46%, #E6EFFA 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.55) 75%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.55) 75%, transparent 100%);
}
.profile-page .pf-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(11, 143, 90, 0.16) 1px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  opacity: 0.55;
}
.profile-page .pf-hero > * { max-width: var(--pf-max); margin-left: auto; margin-right: auto; }
.profile-page .pf-hero-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 10px 12px; }
.profile-page .pf-avatar {
  position: relative; display: grid; place-items: center; flex: 0 0 auto;
  width: 92px; height: 92px; border: 4px solid #fff; border-radius: 50%;
  background: linear-gradient(135deg, #34D399, #059669); color: #fff;
  box-shadow: 0 14px 30px -14px rgba(4, 47, 36, 0.55);
  font-size: 28px; font-weight: 750; letter-spacing: 0.02em;
}
.profile-page .pf-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.profile-page .pf-avatar-dot { position: absolute; left: 5px; bottom: 5px; width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: #C3CCC7; }
.profile-page .pf-avatar[data-state="online"] .pf-avatar-dot { background: #10B981; }
.profile-page .pf-avatar[data-state="leave"] .pf-avatar-dot { background: #F59E0B; }
.profile-page .pf-avatar[data-state="unknown"] .pf-avatar-dot { display: none; }
.profile-page .pf-cam {
  position: absolute; right: -4px; bottom: 0; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; border: 3px solid #fff; border-radius: 50%;
  background: #059669; color: #fff; cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(5, 150, 105, 0.9); transition: transform 0.15s;
}
.profile-page .pf-cam:hover { transform: scale(1.06); }
.profile-page .pf-cam:focus-visible { outline: 2px solid #047857; outline-offset: 2px; }
.profile-page .pf-cam svg { width: 15px; height: 15px; }
.profile-page .pf-who { min-width: 0; }
.profile-page .pf-eyebrow { margin: 0 0 4px; color: var(--pf-em-d); font-size: 12.5px; font-weight: 650; }
.profile-page .pf-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.profile-page .pf-name-row h1 { margin: 0; color: var(--pf-ink); font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.65rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.profile-page .pf-sub { margin: 6px 0 0; color: var(--pf-muted); font-size: 13.5px; }
.profile-page .pf-sub b { color: var(--pf-ink-2); font-weight: 600; }
.profile-page .pf-sub a { color: var(--pf-em-d); font-weight: 650; text-decoration: none; }
.profile-page .pf-sub a:hover { text-decoration: underline; }
.profile-page .pf-dot { display: inline-block; width: 3px; height: 3px; margin: 0 7px; border-radius: 50%; background: var(--pf-faint); vertical-align: middle; }
.profile-page .pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.profile-page .pf-acts { position: relative; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-self: start; }
.profile-page .pf-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; padding: 6px;
  border: 1px solid var(--pf-line); border-radius: 12px; background: #fff;
  box-shadow: 0 18px 40px -16px rgba(11, 31, 23, 0.4);
}
.profile-page .pf-menu[hidden] { display: none; }
.profile-page .pf-menu button, .profile-page .pf-menu a {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--pf-ink-2);
  font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.profile-page .pf-menu button:hover, .profile-page .pf-menu a:hover { background: #F3FAF6; }
.profile-page .pf-menu svg { width: 14px; height: 14px; color: var(--pf-faint); }

/* Hero numbers */
.profile-page .pf-strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(var(--pf-n, 5), minmax(0, 1fr));
  margin: 0 auto; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 14px; background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: var(--pf-shadow-up);
}
.profile-page .pf-strip > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 16px; }
.profile-page .pf-strip > div + div { border-left: 1px solid var(--pf-soft); }
.profile-page .pf-strip small { display: flex; align-items: center; gap: 6px; color: var(--pf-muted); font-size: 11.5px; font-weight: 600; }
.profile-page .pf-strip small svg { width: 13px; height: 13px; }
.profile-page .pf-strip b { color: var(--pf-ink); font-size: 18px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.profile-page .pf-strip b i { color: var(--pf-faint); font-size: 12px; font-style: normal; font-weight: 600; }
.profile-page .pf-strip span { overflow: hidden; color: var(--pf-muted); font-size: 11.5px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-up { color: #047857 !important; }
.profile-page .pf-down { color: #BE123C !important; }
.profile-page .pf-warn { color: #B45309 !important; }

/* ── Tabs ── */
.profile-page .pf-tabs { display: flex; gap: 4px; margin: 0 0 18px; overflow-x: auto; border-bottom: 1px solid var(--pf-line); scrollbar-width: none; }
.profile-page .pf-tabs::-webkit-scrollbar { display: none; }
.profile-page .pf-tab {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-bottom: -1px; padding: 10px 14px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--pf-muted);
  font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.profile-page .pf-tab:hover { color: var(--pf-ink); }
.profile-page .pf-tab.is-on { border-color: var(--pf-em); color: var(--pf-em-d); }
.profile-page .pf-tab:focus-visible { outline: 2px solid var(--pf-em); outline-offset: -2px; border-radius: 6px; }
.profile-page .pf-tab svg { width: 14px; height: 14px; }

/* ── Layout ── */
.profile-page .pf-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-page .pf-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* Paired cards: 2-column masonry (profile.js masonry() puts each card in the shorter column). */
.profile-page .pf-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-page .pf-flow.is-one { grid-template-columns: minmax(0, 1fr); }
.profile-page .pf-flow.is-one > .pf-fcol + .pf-fcol { display: none; }
.profile-page .pf-fcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.profile-page .pf-flow[hidden], .profile-page .pf-strip[hidden], .profile-page .pf-tabs[hidden] { display: none; }
.profile-page [data-pf-slot]:empty { display: none; }
.profile-page [data-pf-slot] { display: contents; }
.profile-page[data-view="personal"] [data-pf-views]:not([data-pf-views~="personal"]),
.profile-page[data-view="attendance"] [data-pf-views]:not([data-pf-views~="attendance"]),
.profile-page[data-view="performance"] [data-pf-views]:not([data-pf-views~="performance"]),
.profile-page[data-view="settings"] [data-pf-views]:not([data-pf-views~="settings"]) { display: none !important; }
.profile-page .pf-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.profile-page .pf-grid.is-single > .pf-left { display: none; }
/* Only the left column has something to show (e.g. Personal info): use the full width
   and flow its cards into balanced columns instead of leaving the right side blank. */
.profile-page .pf-grid.is-left-only { grid-template-columns: minmax(0, 1fr); }
.profile-page .pf-grid.is-left-only > #profile-right { display: none; }
.profile-page .pf-grid.is-left-only > .pf-left { display: block; columns: 2 340px; column-gap: 18px; }
.profile-page .pf-grid.is-left-only > .pf-left [data-pf-card] { break-inside: avoid; margin-bottom: 18px; }

/* ── Cards ── */
.profile-page .pf-card {
  position: relative; min-width: 0; margin: 0; padding: 16px 18px;
  border: 1px solid var(--pf-line); border-radius: var(--pf-radius); background: #fff;
  box-shadow: var(--pf-shadow);
}
.profile-page .pf-card:focus { outline: none; }
.profile-page .pf-card.is-flash { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), var(--pf-shadow); transition: box-shadow 0.3s; }
.profile-page .pf-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.profile-page .pf-h h2 { margin: 0; color: var(--pf-ink); font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.profile-page .pf-h p { margin: 1px 0 0; color: var(--pf-muted); font-size: 12px; }
.profile-page .pf-h-text { min-width: 0; }
.profile-page .pf-h-r { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.profile-page .pf-ico {
  display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--g1, #34D399), var(--g2, #059669)); color: #fff;
  box-shadow: 0 6px 14px -8px var(--g2, #059669);
}
.profile-page .pf-ico svg { width: 15px; height: 15px; }
.profile-page .pf-ico--in { --g1: #818CF8; --g2: #4F46E5; }
.profile-page .pf-ico--vi { --g1: #C084FC; --g2: #7C3AED; }
.profile-page .pf-ico--am { --g1: #FBBF24; --g2: #D97706; }
.profile-page .pf-ico--sky { --g1: #38BDF8; --g2: #0284C7; }
.profile-page .pf-ico--te { --g1: #2DD4BF; --g2: #0D9488; }
.profile-page .pf-ico--ro { --g1: #FB7185; --g2: #E11D48; }
.profile-page .pf-sh { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; color: var(--pf-faint); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.profile-page .pf-sh svg { width: 12px; height: 12px; }
.profile-page .pf-note { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; color: var(--pf-muted); font-size: 11.5px; line-height: 1.45; }
.profile-page .pf-note svg { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 1px; }
.profile-page .pf-empty { display: flex; align-items: center; gap: 10px; padding: 6px 0 2px; color: var(--pf-muted); font-size: 12.5px; }
.profile-page .pf-empty span { display: inline-grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #ECFDF5; color: var(--pf-em); }
.profile-page .pf-empty svg { width: 14px; height: 14px; }

/* About facts */
.profile-page .pf-facts { margin: 0; }
.profile-page .pf-f { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; }
.profile-page .pf-f + .pf-f { border-top: 1px dashed var(--pf-line); }
.profile-page .pf-f > svg { width: 15px; height: 15px; margin-top: 2px; color: var(--pf-faint); }
.profile-page .pf-f dt { color: var(--pf-muted); font-size: 11px; font-weight: 600; }
.profile-page .pf-f dd { margin: 1px 0 0; color: var(--pf-ink); font-size: 12.5px; font-weight: 550; }
.profile-page .pf-f dd a { color: var(--pf-em-d); text-decoration: none; }
.profile-page .pf-f dd a:hover { text-decoration: underline; }
.profile-page .pf-lock { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; color: var(--pf-faint); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.profile-page .pf-lock svg { width: 12px; height: 12px; }
.profile-page .pf-form { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #A7F3D0; border-radius: 12px; background: #F6FEFA; }
.profile-page .pf-form[hidden] { display: none; }
.profile-page .pf-form .field { display: flex; flex-direction: column; gap: 5px; color: var(--pf-ink-2); font-size: 12px; font-weight: 600; }
.profile-page .pf-form .field input { width: 100%; }
.profile-page .pf-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-page .pf-status { margin: 6px 0 0; color: var(--pf-muted); font-size: 12px; }
.profile-page .pf-status:empty { display: none; }

/* People */
.profile-page .pf-person { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 4px; border-radius: 10px; text-decoration: none; }
.profile-page a.pf-person:hover { background: #F8FBF9; }
.profile-page .pf-person b { display: block; overflow: hidden; color: var(--pf-ink); font-size: 12.5px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-person small { display: block; color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-av {
  display: inline-grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; overflow: hidden;
  border-radius: 50%; background: var(--av, #10B981); color: #fff; font-size: 11px; font-weight: 700;
}
.profile-page .pf-av img { width: 100%; height: 100%; object-fit: cover; }
.profile-page .pf-stack { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.profile-page .pf-stack-avs { display: flex; }
.profile-page .pf-stack-avs > * { width: 30px; height: 30px; margin-left: -6px; border: 2px solid #fff; font-size: 9.5px; text-decoration: none; box-sizing: border-box; }
.profile-page .pf-stack-avs > *:first-child { margin-left: 0; }
.profile-page .pf-stack small { color: var(--pf-muted); font-size: 11.5px; }

/* Skills */
.profile-page .pf-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-page .pf-sk { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--pf-line); border-radius: 8px; background: var(--pf-tint); color: var(--pf-ink-2); font-size: 12px; font-weight: 600; }
.profile-page .pf-sk i { padding: 0 5px; border-radius: 6px; background: #ECFDF5; color: var(--pf-em-d); font-size: 10.5px; font-style: normal; font-weight: 700; }

/* Completeness */
.profile-page .pf-complete { display: flex; align-items: center; gap: 12px; }
.profile-page .pf-bar { flex: 1 1 auto; height: 8px; overflow: hidden; border-radius: 999px; background: #EEF2F0; }
.profile-page .pf-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #34D399, #059669); }
.profile-page .pf-todo { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.profile-page .pf-todo li { display: flex; align-items: center; gap: 8px; color: var(--pf-ink-2); font-size: 12px; }
.profile-page .pf-todo li svg { width: 14px; height: 14px; color: var(--pf-em); }
.profile-page .pf-todo li.is-no { color: var(--pf-muted); }
.profile-page .pf-todo li.is-no svg { color: var(--pf-faint); }
.profile-page .pf-todo .pf-link { margin-left: auto; }

/* Performance */
.profile-page .pf-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #F1F4F2; }
.profile-page .pf-seg button { padding: 4px 10px; border: 0; border-radius: 7px; background: none; color: var(--pf-muted); font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; }
.profile-page .pf-seg button.is-on { background: #fff; color: var(--pf-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12); }
.profile-page .pf-seg button:focus-visible { outline: 2px solid var(--pf-em); outline-offset: 1px; }
.profile-page .pf-perf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: stretch; }
.profile-page .pf-chart { display: flex; flex-direction: column; padding: 10px 12px 26px; border: 1px solid var(--pf-soft); border-radius: 14px; background: linear-gradient(180deg, #FBFAFF, #fff); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.profile-page .pf-chart:hover { border-color: #DDD6FE; box-shadow: 0 8px 20px -14px rgba(109, 40, 217, .45); }
.profile-page .pf-chart:focus-visible, .profile-page .pf-cols > div:focus-visible { outline: 2px solid #7C3AED; outline-offset: 2px; }
.profile-page .pf-chart-h .pf-cap { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 11px; }
.profile-page .pf-chart-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.profile-page .pf-chart-h span { color: var(--pf-faint); }
.profile-page .pf-cols { display: grid; grid-template-columns: repeat(var(--pf-cols, 6), minmax(0, 1fr)); gap: 10px; height: 96px; margin-top: 18px; border-bottom: 1px solid var(--pf-line); }
.profile-page .pf-cols > div { position: relative; display: flex; justify-content: center; height: 100%; border-radius: 6px; }
.profile-page .pf-cols > div:hover i:not(.pf-proj) { filter: brightness(.92); }
.profile-page .pf-cols i { position: absolute; bottom: 0; width: 70%; max-width: 34px; min-height: 3px; border-radius: 7px 7px 2px 2px; background: #DDD6FE; }
.profile-page .pf-cols .is-cur i { z-index: 1; background: linear-gradient(180deg, #A78BFA, #7C3AED); }
.profile-page .pf-cols .is-cur i.pf-proj { z-index: 0; border: 1.5px dashed #C4B5FD; background: repeating-linear-gradient(135deg, #EDE9FE 0 5px, #fff 5px 9px); }
.profile-page .pf-cols em { position: absolute; bottom: calc(var(--h, 0%) + 4px); color: var(--pf-ink-2); font-size: 11px; font-style: normal; font-weight: 700; }
.profile-page .pf-cols span { position: absolute; bottom: -20px; color: var(--pf-muted); font-size: 11px; font-weight: 600; }
.profile-page .pf-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 28px 0 0; color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #7C3AED; }
.profile-page .pf-sw--proj { margin-left: 8px; border: 1.5px dashed #C4B5FD; background: #EDE9FE; }
.profile-page .pf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.profile-page .pf-tiles > div { min-width: 0; padding: 8px 10px; border: 1px solid #EDE9FE; border-radius: 12px; background: linear-gradient(180deg, #F5F3FF, #fff); }
.profile-page .pf-tiles small { display: block; overflow: hidden; color: #6D28D9; font-size: 11px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-tiles b { display: block; margin: 1px 0; font-size: 18px; letter-spacing: -0.02em; }
.profile-page .pf-tiles em { color: var(--pf-muted); font-size: 11px; font-style: normal; font-weight: 650; }
.profile-page .pf-tiles > div[title] { cursor: help; }
.profile-page .pf-tip { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 2px; border-radius: 50%; background: #EDE9FE; color: #6D28D9; font-size: 9px; font-style: normal; font-weight: 800; vertical-align: 1px; }
.profile-page .pf-note--top { margin: 0 0 12px; }
.profile-page .pf-bystep { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.profile-page .pf-bystep b { margin-left: 4px; color: #6D28D9; }
.profile-page .pf-steps { display: flex; flex-direction: column; margin: 4px 0 0; padding: 0; list-style: none; }
.profile-page .pf-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.profile-page .pf-steps li + li { border-top: 1px dashed var(--pf-line); }
.profile-page .pf-steps li[hidden] { display: none; }
.profile-page .pf-steps a { display: grid; flex: 1; min-width: 0; gap: 1px; color: inherit; text-decoration: none; }
.profile-page .pf-steps a:hover span { color: var(--pf-em-d); text-decoration: underline; }
.profile-page .pf-steps a b { color: #6D28D9; font-size: 11.5px; font-weight: 700; }
.profile-page .pf-steps a span { overflow: hidden; color: var(--pf-ink); font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-steps a small { color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-step-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.profile-page .pf-empty--sm { padding-top: 2px; }

/* Attendance calendar */
.profile-page .pf-wk, .profile-page .pf-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.profile-page .pf-wk span { padding-bottom: 4px; color: var(--pf-faint); font-size: 10.5px; font-weight: 700; text-align: center; }
.profile-page .pf-day { display: grid; place-items: center; height: 30px; border: 1px solid var(--pf-soft); border-radius: 8px; background: var(--pf-tint); color: var(--pf-ink-2); font-size: 11.5px; font-weight: 650; }
.profile-page .pf-day.is-blank { visibility: hidden; }
.profile-page .pf-day.is-present { border-color: #10B981; background: #10B981; color: #fff; }
.profile-page .pf-day.is-half_leave { border-color: #A7F3D0; background: #A7F3D0; color: #065F46; }
.profile-page .pf-day.is-duty { border-color: #5EEAD4; background: #CCFBF1; color: #0F766E; }
.profile-page .pf-day.is-leave { border-color: #7DD3FC; background: #E0F2FE; color: #0369A1; }
.profile-page .pf-day.is-holiday { border-color: #FCD34D; background: #FEF3C7; color: #92400E; }
.profile-page .pf-day.is-off { background: #F1F4F2; color: var(--pf-faint); }
.profile-page .pf-day.is-missed { border-color: #FECDD3; background: #FFF1F2; color: #BE123C; }
.profile-page .pf-day.is-before_joining { background: #fff; color: #C9D1CD; }
.profile-page .pf-day.is-today { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #059669; }
.profile-page .pf-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.profile-page .pf-legend i { width: 9px; height: 9px; border-radius: 3px; }
.profile-page .pf-mini3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.profile-page .pf-mini3 > div { padding: 8px 10px; border: 1px solid var(--pf-soft); border-radius: 12px; }
.profile-page .pf-mini3 b { display: block; font-size: 15px; }
.profile-page .pf-mini3 small { color: var(--pf-muted); font-size: 11px; }
.profile-page .pf-strip14 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.profile-page .pf-strip14 .pf-day { height: 44px; align-content: center; gap: 1px; }
.profile-page .pf-strip14 .pf-day small { color: inherit; font-size: 9.5px; font-weight: 700; opacity: 0.75; }

/* Leave */
.profile-page .pf-lv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.profile-page .pf-ring { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(#0D9488 0 var(--p, 0%), #CCFBF1 var(--p, 0%) 100%); }
.profile-page .pf-ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.profile-page .pf-ring span { position: relative; z-index: 1; font-size: 19px; font-weight: 800; line-height: 1; text-align: center; }
.profile-page .pf-ring small { display: block; margin-top: 3px; color: var(--pf-muted); font-size: 10.5px; font-weight: 600; }
.profile-page .pf-rows { display: grid; gap: 9px; }
.profile-page .pf-rows > div, .profile-page .pf-rows > .pf-lv-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 64px; align-items: center; gap: 8px; font-size: 12px; }
.profile-page .pf-lv-row { width: 100%; margin: -3px -6px; padding: 3px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; box-sizing: content-box; }
.profile-page .pf-lv-row:hover, .profile-page .pf-lv-row[aria-expanded="true"] { background: #F0FDFA; }
.profile-page .pf-lv-row:focus-visible { outline: 2px solid var(--pf-em); outline-offset: 1px; }
.profile-page .pf-lv-row span { text-decoration: underline dotted rgba(97, 112, 106, 0.5); text-underline-offset: 3px; }
.profile-page .pf-rows b small { display: block; color: var(--pf-faint); font-size: 10.5px; font-weight: 600; }
.profile-page .pf-meter { position: relative; }
.profile-page .pf-meter > i.pf-meter-pending { position: absolute; top: 0; border-radius: 0; background: repeating-linear-gradient(135deg, #99F6E4 0 4px, #CCFBF1 4px 8px); }
.profile-page .pf-lv-list { margin-top: 12px; padding: 4px 12px 2px; border: 1px solid #CCFBF1; border-radius: 12px; background: #F8FFFD; }
.profile-page .pf-lv-list[hidden] { display: none; }
.profile-page .pf-rows span { color: var(--pf-muted); font-weight: 550; }
.profile-page .pf-rows b { text-align: right; }
.profile-page .pf-meter { height: 6px; overflow: hidden; border-radius: 999px; background: #EEF2F0; }
.profile-page .pf-meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2DD4BF, #0D9488); }
.profile-page .pf-meter--amber > i { background: linear-gradient(90deg, #FCD34D, #F59E0B); }
.profile-page .pf-up-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.profile-page .pf-up-row + .pf-up-row { border-top: 1px dashed var(--pf-line); }
.profile-page .pf-up-row b { display: block; font-size: 12.5px; }
.profile-page .pf-up-row small { color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-up-row > .pf-pill { margin-left: auto; }
.profile-page .pf-up-row > div { flex: 1; min-width: 0; }
.profile-page .pf-up-row > .pf-date { flex: 0 0 auto; }
.profile-page .pf-up-row b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-up-row > .pf-pill { flex: 0 0 auto; }
.profile-page .pf-kebab { position: relative; flex: 0 0 auto; }
.profile-page .pf-kebab .pf-btn--icon { padding: 5px 6px; }
.profile-page .pf-kebab .pf-menu { min-width: 190px; }
.profile-page .pf-date { display: grid; flex: 0 0 auto; place-items: center; align-content: center; width: 40px; height: 40px; border-radius: 10px; background: #E0F2FE; color: #0369A1; }
.profile-page .pf-date b { font-size: 14px; line-height: 1; }
.profile-page .pf-date small { color: inherit; font-size: 8.5px; font-weight: 800; }
.profile-page .pf-date--hol { background: #FEF3C7; color: #92400E; }
.profile-page .pf-date--wait { background: #FFFBEB; color: #B45309; }
.profile-page .pf-hist { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--pf-muted); font-size: 12px; }
.profile-page .pf-hist b { color: var(--pf-ink); }
.profile-page .pf-hist .pf-link { margin-left: auto; }
.profile-page .pf-recent { margin: 8px 0 0; padding: 0; list-style: none; }
.profile-page .pf-recent[hidden] { display: none; }
.profile-page .pf-recent li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.profile-page .pf-recent li + li { border-top: 1px dashed var(--pf-line); }
.profile-page .pf-recent li span:first-child { min-width: 0; color: var(--pf-ink-2); font-weight: 600; }
.profile-page .pf-recent li small { color: var(--pf-muted); }
.profile-page .pf-recent li .pf-pill { margin-left: auto; }

/* Settings rows */
.profile-page .pf-srow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.profile-page .pf-srow + .pf-srow, .profile-page .pf-srow + .pf-form + .pf-srow { border-top: 1px dashed var(--pf-line); }
.profile-page .pf-srow b { display: block; font-size: 12.5px; }
.profile-page .pf-srow small { display: block; color: var(--pf-muted); font-size: 11.5px; }
.profile-page .pf-srow > div { min-width: 0; }
.profile-page .pf-srow > .pf-btn, .profile-page .pf-srow > .pf-link, .profile-page .pf-srow > .pf-pill, .profile-page .pf-srow > .pf-srow-acts { margin-left: auto; }
.profile-page .pf-srow-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.profile-page .pf-si { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border: 1px solid var(--pf-soft); border-radius: 10px; background: var(--pf-tint); color: var(--pf-ink-2); }
.profile-page .pf-si svg { width: 16px; height: 16px; }
.profile-page .pf-retry { display: flex; align-items: center; gap: 10px; color: #BE123C; font-size: 12.5px; }
.profile-page .pf-retry .pf-btn { margin-left: auto; }

/* ── Dialogs on <body> ── */
.pfm-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal, 1000);
  display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
  background: rgba(11, 31, 23, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.pfm-card {
  width: min(680px, 100%); margin: auto; padding: 20px;
  border: 1px solid var(--color-border, #E5E9E7); border-radius: 20px; background: #fff;
  box-shadow: 0 40px 80px -30px rgba(11, 31, 23, 0.6);
}
.pfm-card--sm { width: min(500px, 100%); }
.pfm-form { display: flex; flex-direction: column; gap: 14px; }
.pfm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pfm-title { margin: 0; color: #0B1F17; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.pfm-sub { margin: 3px 0 0; color: #61706A; font-size: 12px; }
.pfm-close { flex-shrink: 0; border: none; background: transparent; }
.pfm-close i, .pfm-close svg { width: 17px; height: 17px; }
.pfm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pfm-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.pfm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pfm-label { color: #2F3B36; font-size: 12px; font-weight: 600; }
.pfm-field .input, .pfm-field input, .pfm-field select { width: 100%; }
.pfm-readonly { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border: 1px dashed #D3DAD6; border-radius: 8px; background: #F8FAF9; color: #2F3B36; font-size: 13px; }
.pfm-checks { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2px; }
.pfm-check { display: inline-flex; align-items: center; gap: 6px; color: #2F3B36; font-size: 12px; font-weight: 500; cursor: pointer; }
.pfm-check input { margin: 0; }
.pfm-flag { display: inline-flex; align-items: center; gap: 8px; color: #2F3B36; font-size: 12px; font-weight: 600; cursor: pointer; }
.pfm-flag input { margin: 0; }
.pfm-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; border-top: 1px solid var(--color-border, #E5E9E7); }
.pfm-status { min-height: 1em; margin: 0; font-size: 12px; text-align: right; }

/* Photo dialog */
.pfm-photo { width: min(580px, 100%); padding: 0; overflow: hidden; }
.pfm-photo .pfm-ph { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #EFF2F1; background: linear-gradient(180deg, #F3FAF6, #fff); }
.pfm-photo .pfm-ph-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #34D399, #059669); color: #fff; }
.pfm-photo .pfm-ph-ico svg { width: 16px; height: 16px; }
.pfm-photo .pfm-close { margin-left: auto; color: #61706A; cursor: pointer; }
.pfm-photo .pfm-pb { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 20px; }
.pfm-crop { position: relative; width: 220px; height: 220px; overflow: hidden; border-radius: 16px; background: #0B1F17; cursor: grab; touch-action: none; user-select: none; }
.pfm-crop.is-dragging { cursor: grabbing; }
.pfm-crop canvas { display: block; width: 220px; height: 220px; }
.pfm-crop-ring { position: absolute; inset: 20px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 999px rgba(11, 31, 23, 0.45); pointer-events: none; }
.pfm-crop-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #CCFBF1; font-size: 12px; text-align: center; }
.pfm-zoom { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #61706A; }
.pfm-zoom svg { width: 14px; height: 14px; flex: 0 0 auto; }
.pfm-zoom input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: #059669; }
.pfm-zoom button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #E5E9E7; border-radius: 8px; background: #fff; color: #2F3B36; cursor: pointer; }
.pfm-drop { display: block; padding: 18px; border: 1.5px dashed #A7F3D0; border-radius: 14px; background: #F6FEFA; color: #61706A; font-size: 12px; text-align: center; cursor: pointer; }
.pfm-drop.is-over { border-color: #059669; background: #ECFDF5; }
.pfm-drop b { display: block; margin: 8px 0 2px; color: #0B1F17; font-size: 13px; }
.pfm-drop .pfm-ph-ico { margin: 0 auto; }
.pfm-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pfm-prev { display: flex; align-items: flex-end; gap: 14px; margin-top: 14px; }
.pfm-prev div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #98A39E; font-size: 10.5px; }
.pfm-prev canvas { border: 2px solid #fff; border-radius: 50%; background: #E5E9E7; box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15); }
.pfm-rules { display: grid; gap: 5px; margin: 14px 0 0; padding: 0; color: #61706A; font-size: 11.5px; list-style: none; }
.pfm-rules li { display: flex; align-items: center; gap: 7px; }
.pfm-rules svg { width: 13px; height: 13px; color: #059669; }
.pfm-pf { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid #EFF2F1; background: #FBFCFB; }
.pfm-pf .pfm-status { margin-right: auto; text-align: left; }

/* Your avatar in the top bar, after the bell (app shell; links to /profile/me) */
.header-user { display: inline-flex; align-items: center; margin-left: 4px; border-radius: 50%; text-decoration: none; }
.header-user:focus-visible { outline: 2px solid #059669; outline-offset: 2px; }
.header-user .header-user-avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #34D399, #059669);
  color: #fff; font-size: 13px; font-weight: 750; box-shadow: 0 0 0 1px #D3E7DB, 0 4px 10px -6px rgba(4, 47, 36, 0.6);
  transition: transform 0.15s, box-shadow 0.15s;
}
.header-user:hover .header-user-avatar { transform: translateY(-1px); box-shadow: 0 0 0 2px #A7F3D0, 0 6px 14px -6px rgba(4, 47, 36, 0.6); }
#user-initial.has-photo { overflow: hidden; padding: 0; background: #E5E9E7; }
#user-initial.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .profile-page .pf-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .profile-page .pf-hero-body { grid-template-columns: auto minmax(0, 1fr); }
  .profile-page .pf-acts { grid-column: 2; justify-content: flex-start; }
  .profile-page .pf-perf { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .profile-page .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-page .pf-left { order: 2; }
  .profile-page .pf-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .profile-page .pf-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-page .pf-strip > div { border-left: 0 !important; border-top: 1px solid var(--pf-soft); }
  .profile-page .pf-strip > div:nth-child(-n + 3) { border-top: 0; }
}
@media (max-width: 680px) {
  .profile-page .pf-hero-body { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; padding: 16px 4px 10px; text-align: center; }
  .profile-page .pf-avatar { width: 84px; height: 84px; font-size: 26px; }
  .profile-page .pf-name-row, .profile-page .pf-chips, .profile-page .pf-acts { justify-content: center; }
  .profile-page .pf-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 auto; }
  .profile-page .pf-strip > div:nth-child(3) { border-top: 1px solid var(--pf-soft); }
  .profile-page .pf-strip > div:last-child:nth-child(odd) { grid-column: span 2; }
  .profile-page .pf-h { flex-wrap: wrap; }
  .profile-page .pf-h-r { margin-left: 40px; }
  .profile-page .pf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .pfm-overlay { align-items: flex-end; padding: 0; }
  .pfm-card { width: 100%; max-width: 100%; max-height: 92vh; margin: 0; overflow-y: auto; border-radius: 20px 20px 0 0; }
  .pfm-grid, .pfm-grid-3 { grid-template-columns: 1fr; }
  .pfm-photo .pfm-pb { grid-template-columns: minmax(0, 1fr); justify-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-page .pf-cam, .profile-page .pf-btn { transition: none; }
}

/* ── Steps side panel (opened from the Performance chart; lives on <body>) ── */
.pf-drawer-overlay { position: fixed; inset: 0; z-index: calc(var(--z-overlay, 290) + 30); background: rgba(11, 31, 23, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: pf-drawer-fade .16s ease-out; }
.pf-drawer { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(460px, 100vw); background: #fff; box-shadow: -24px 0 60px -30px rgba(4, 47, 36, .5); color: #0B1F17; font-size: 13px; animation: pf-drawer-in .22s cubic-bezier(.16, 1, .3, 1); }
.pf-drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid #EFF2F1; }
.pf-drawer-head h2 { margin: 0; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.pf-drawer-head p { margin: 3px 0 0; color: #61706A; font-size: 12.5px; }
.pf-drawer-close { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border: 1px solid #E5E9E7; border-radius: 10px; background: #fff; color: #2F3B36; font-size: 18px; cursor: pointer; }
.pf-drawer-close:hover { background: #F3FAF6; }
.pf-drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px 20px; }
.pf-drawer .pf-bystep { margin: 0 0 8px; }
.pf-drawer .pf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid #EDE9FE; border-radius: 999px; background: #F5F3FF; color: #2F3B36; font-size: 12px; font-weight: 600; }
.pf-drawer .pf-chip b { color: #6D28D9; }
.pf-drawer .pf-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pf-drawer .pf-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.pf-drawer .pf-steps li + li { border-top: 1px dashed #E5E9E7; }
.pf-drawer .pf-steps a { display: grid; flex: 1; min-width: 0; gap: 1px; color: inherit; text-decoration: none; }
.pf-drawer .pf-steps a:hover span { color: #047857; text-decoration: underline; }
.pf-drawer .pf-steps a b { color: #6D28D9; font-size: 11.5px; font-weight: 700; }
.pf-drawer .pf-steps a span { overflow: hidden; font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.pf-drawer .pf-steps a small { color: #61706A; font-size: 11.5px; }
.pf-drawer .pf-step-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pf-drawer .pf-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.pf-drawer .pf-pill--done { background: #ECFDF5; color: #047857; }
.pf-drawer .pf-pill--wait { background: #FFFBEB; color: #B45309; }
.pf-drawer .pf-pill--back { background: #FFF1F2; color: #BE123C; }
.pf-drawer .pf-pill--info { background: #E0F2FE; color: #0369A1; }
.pf-drawer .pf-empty { display: flex; align-items: center; gap: 10px; color: #61706A; }
.pf-drawer .pf-empty span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #F5F3FF; color: #6D28D9; }
.pf-drawer svg.lucide { width: 15px; height: 15px; }
@keyframes pf-drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pf-drawer-fade { from { opacity: 0; } to { opacity: 1; } }
/* ── Overview density (2026-10-13): narrower left column, wider card columns,
   tighter gaps — each card keeps its header on one row like the dashboard. ── */
.profile-page .pf-grid { grid-template-columns: 272px minmax(0, 1fr); gap: 16px; }
.profile-page .pf-col { gap: 14px; }
.profile-page .pf-flow, .profile-page .pf-fcol { gap: 14px; }
.profile-page .pf-flow .pf-card { padding: 14px 15px; }
.profile-page .pf-flow .pf-h { flex-wrap: nowrap; }
.profile-page .pf-flow .pf-h-text { flex: 1 1 auto; min-width: 0; }
.profile-page .pf-flow .pf-h-text h2, .profile-page .pf-flow .pf-h-text p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-flow .pf-h-r { white-space: nowrap; }
.profile-page .pf-flow .pf-h-r .pf-btn { padding: 6px 11px; }
.profile-page .pf-days { gap: 4px; }
.profile-page .pf-day { height: 28px; }
.profile-page .pf-mini3 { gap: 6px; margin-top: 10px; }
.profile-page .pf-mini3 > div { min-width: 0; padding: 7px 9px; }
.profile-page .pf-mini3 b { font-size: 14px; }
.profile-page .pf-mini3 small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-page .pf-lv { gap: 12px; }
.profile-page .pf-ring { width: 88px; height: 88px; }
.profile-page .pf-rows > div, .profile-page .pf-rows > .pf-lv-row { grid-template-columns: minmax(56px, auto) minmax(36px, 1fr) auto; }
.profile-page .pf-rows span { white-space: nowrap; }
@media (max-width: 1180px) {
  .profile-page .pf-grid { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .profile-page .pf-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Hero, wide screens: the numbers strip sits on the right, under the action buttons,
   beside the name — instead of a separate row below — so the hero is much shorter.
   .pf-hero-body is display:contents so its avatar / who / actions join this grid. */
@media (min-width: 1181px) {
  .profile-page .pf-hero-in { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.55fr); grid-template-rows: auto 1fr; column-gap: 20px; row-gap: 12px; align-items: center; padding: 16px 10px 14px; }
  .profile-page .pf-hero-in > .pf-hero-body { display: contents; }
  .profile-page .pf-hero-in .pf-avatar { grid-column: 1; grid-row: 1 / 3; }
  .profile-page .pf-hero-in .pf-who { grid-column: 2; grid-row: 1 / 3; }
  .profile-page .pf-hero-in .pf-acts { grid-column: 3; grid-row: 1; justify-self: end; }
  .profile-page .pf-hero-in > .pf-strip { grid-column: 3; grid-row: 2; align-self: end; width: 100%; margin: 0; }
  .profile-page .pf-hero-in > .pf-strip > div { padding: 9px 12px; }
  .profile-page .pf-hero-in > .pf-strip b { font-size: 17px; }
  .profile-page .pf-hero-in > .pf-strip small, .profile-page .pf-hero-in > .pf-strip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
