/* AlgoLab — Profile page (components/user_profile.py): pf- classes on top of the shared
   pk- ones in pages_style.css. Loaded globally from /assets, so every rule is pf- scoped.
   --pf-c = the user's background colour, set on #pf_root and updated live by the picker. */

.pf-page { height: calc(100vh - 84px); overflow-y: auto; padding: 8px 1.4vw 40px; --pf-c: rgb(11,132,145); }
.pf-inner { max-width: 1240px; margin: 0 auto; }

/* hero */
.pf-hero { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 12px;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; }
.pf-avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.35rem; font-weight: 600; color: #fff; letter-spacing: .5px;
  background: linear-gradient(135deg, rgb(0,0,0) 0%, var(--pf-c) 100%); border: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 26px -6px var(--pf-c); }
.pf-who { flex: 1; min-width: 0; }
.pf-name { color: #cfefff; font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.pf-meta { color: #9fb3c8; font-size: .78rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-kpis { display: flex; gap: 8px; }
.pf-kpis .pk-kpi { flex: 0 0 auto; min-width: 100px; text-align: center; }

/* two columns of cards */
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 12px; align-items: start; }
.pf-col { display: flex; flex-direction: column; gap: 12px; }
.pf-col > .pk-card { margin-bottom: 0; padding: 14px 16px; }
.pf-col > .pk-card > .pk-card-title { font-size: .95rem; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: 1fr; } }

/* fields */
.pf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.pf-field.wide { grid-column: 1 / -1; }
.pf-label { display: block; color: #9fb3c8; font-size: .66rem; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 5px; }
.pf-hint { color: #7f93a8; font-size: .68rem; margin-top: 4px; line-height: 1.35; }
.pf-page input[type=text], .pf-page input[type=password] { height: 32px; }
.pf-page textarea { width: 100%; min-height: 76px; resize: vertical; font-family: inherit; }
.pf-page .Select-control { height: 32px; }
.pf-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; min-height: 18px; }
.pf-actions:empty { margin-top: 0; min-height: 0; }
.pf-msg { font-size: .74rem; }
.pf-msg i { margin-right: 6px; }
.pf-msg.ok { color: #8fd49a; }
.pf-msg.bad { color: #ffb4ac; }
.pf-inline { display: flex; gap: 8px; align-items: center; }
.pf-inline input { flex: 1; }
.pf-page .pk-btn { padding: 5px 12px; }
.pf-empty { color: #7f93a8; font-size: .72rem; line-height: 1.4; }

/* language tiles */
.pf-langs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-langs > label { padding: 9px 10px; }
.pf-lang { display: flex; align-items: center; gap: 10px; }
.pf-code { flex: 0 0 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .76rem; letter-spacing: .6px; color: #cfefff; background: rgba(255,255,255,0.07); }
.pk-tiles > label:has(input:checked) .pf-code { background: rgba(240,160,48,0.2); color: #f5d6a3; }

/* appearance */
.pf-appear { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pf-picker { flex: 0 0 auto; }
.pf-picker > div { background: transparent !important; }
.pf-swatches { flex: 1; min-width: 230px; display: flex; flex-direction: column; gap: 14px; }
.pf-cur-row { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pf-cur-row .pf-label { margin-bottom: 2px; }
.pf-current { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.22); }
.pf-codetxt { color: #e8e8e8; font-size: .78rem; font-family: ui-monospace, Consolas, monospace; }
.pf-cur-row .pk-btn { margin-left: auto; }
.pf-cur-row .pk-btn i { color: #f0a030; }
.pf-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-sw-wrap { position: relative; }
.pf-page .pf-sw { display: block; width: 30px; height: 30px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.18); transition: transform .1s, box-shadow .1s, border-color .1s;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, var(--sw) 60%); }
.pf-page .pf-sw:hover { transform: translateY(-1px); border-color: #f0a030; }
.pf-page .pf-sw.cur { box-shadow: 0 0 0 2px #f0a030; border-color: transparent; }
.pf-page .pf-x { position: absolute; top: -6px; right: -6px; width: 17px; height: 17px; padding: 0; border-radius: 50%;
  font-size: 12px; line-height: 14px; text-align: center; cursor: pointer; display: none;
  background: #1a222b; color: #cfdcea; border: 1px solid rgba(255,255,255,0.3); }
.pf-sw-wrap:hover .pf-x { display: block; }
.pf-page .pf-x:hover { color: #ffb4ac; border-color: #ff7b72; }

/* danger zone */
.pf-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 12px;
  border-top: 1px solid rgba(255,123,114,0.18); }
.pf-danger-t { color: #ffb4ac; font-size: .8rem; font-weight: 600; }

/* jobs & usage card (full width under the two columns) */
.pf-wide { margin-top: 12px; }
.pf-wide > .pk-card { padding: 14px 16px; }

/* Appearance ▸ Mobile app: the phone app's own colour (components/mobile/look.py) */
.pf-mobile { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.pf-mob-row { display: flex; gap: 16px; align-items: flex-start; }
.pf-mob-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pf-mob-body .pf-label i { color: #f0a030; margin-right: 4px; }
.pf-phone { flex: 0 0 54px; width: 54px; height: 100px; border-radius: 12px; padding: 4px; background: #05080b;
            border: 1px solid rgba(255,255,255,0.22); box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
.pf-phone-scr { width: 100%; height: 100%; border-radius: 8px; background-color: #020507; }
.pf-page .pf-sw.pf-mob { border-radius: 50%; display: flex; align-items: center; justify-content: center;
                         color: rgba(255,255,255,0.9); font-size: .7rem;
                         background: linear-gradient(160deg, #04161c, var(--sw)); }
