/* =========================================================
   Prolance – dashboards (dashboard.html + freelancer.html)
   Builds on variables, buttons, avatar, user-menu, modal and
   toast styles from style.css
   ========================================================= */
body.dash-page { background: #f6f7fb; min-height: 100vh; display: flex; flex-direction: column; }
.dash-main { flex: 1; padding: 34px 0 70px; }
.btn-sm { padding: 9px 16px; font-size: .88rem; }
.btn-xs { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn-light { background: #fff; color: var(--text); border: 1.5px solid #dde2f0; }
.btn-light:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-danger-ghost { color: #dc2626; border: 1.5px solid #fecaca; background: #fff; }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-success { background: #10b981; color: #fff; box-shadow: 0 8px 18px -8px #10b981; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }
.confirming { background: #f59e0b !important; color: #fff !important; border-color: #f59e0b !important; animation: pulseBtn 1s infinite; }
@keyframes pulseBtn { 50% { box-shadow: 0 0 0 6px rgba(245,158,11,.2); } }

/* ---------- Header ---------- */

/* ---------- Hero ---------- */
.dash-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 32px; border-radius: 20px; background: linear-gradient(120deg, #1e2a78, var(--primary) 55%, #10a5b5); color: #fff; margin-bottom: 22px; animation: fadeUp .6s var(--ease); }
.dash-hero.freelancer { background: linear-gradient(120deg, #0b3b46, #0f766e 50%, #10b981); }
.dash-hero::before, .dash-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.dash-hero::before { width: 260px; height: 260px; right: -60px; top: -120px; animation: blob 12s infinite ease-in-out; }
.dash-hero::after { width: 160px; height: 160px; right: 220px; bottom: -90px; animation: blob 14s infinite ease-in-out reverse; }
.dash-hero > * { position: relative; z-index: 1; }
.dash-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.dash-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.dash-sub { opacity: .85; margin-top: 6px; max-width: 560px; }
.dash-hero .btn-white { color: var(--primary); }
.dash-hero.freelancer .btn-white { color: #0f766e; }

/* Profile completeness widget */
.completeness { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 12px 18px; border-radius: 14px; }
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.2) 0); transition: --p 1s; }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: #0f766e; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.completeness strong { display: block; font-size: .95rem; }
.completeness small { opacity: .8; font-size: .8rem; }
.completeness button { color: #fff; text-decoration: underline; font-weight: 600; font-size: .82rem; margin-top: 2px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #fff; border: 1px solid #eceff6; border-radius: 16px; box-shadow: 0 4px 18px -12px rgba(15,23,72,.2); animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 100ms); transition: transform .3s var(--ease), box-shadow .3s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sc-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--light); flex-shrink: 0; }
.stat-card strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.sc-label { color: var(--muted); font-size: .86rem; }
.stat-card small { display: block; color: #a3aac2; font-size: .75rem; }

/* ---------- Tabs ---------- */
.dash-tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid #e3e7f1; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs button { padding: 12px 16px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s; }
.dash-tabs button:hover { color: var(--dark); }
.dash-tabs button.active { color: var(--primary); }
.dash-tabs .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 11px; background: #eef2ff; color: var(--primary); font-size: .75rem; }
.tab-ind { position: absolute; left: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); transition: transform .4s var(--ease), width .4s var(--ease); }
.panel-in { animation: fadeUp .45s var(--ease); }

/* ---------- Toolbar (filters) ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search::before { content: '🔍'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: .9rem; opacity: .6; }
.toolbar input, .toolbar select { width: 100%; padding: 11px 14px; border: 1.5px solid #dde2f3; border-radius: 10px; font: inherit; background: #fff; transition: border-color .2s, box-shadow .2s; }
.toolbar .search input { padding-left: 40px; }
.toolbar select { width: auto; cursor: pointer; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,91,234,.12); }
.result-count { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }

/* ---------- Cards ---------- */
.card-list { display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; border: 1px solid #e8ebf3; border-radius: 16px; padding: 22px 24px; box-shadow: 0 4px 18px -14px rgba(15,23,72,.25); animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); transition: box-shadow .3s, border-color .3s; }
.card:hover { box-shadow: 0 16px 36px -22px rgba(15,23,72,.35); border-color: #dfe4f2; }
.card-head { display: flex; align-items: flex-start; gap: 14px; }
.role-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, #eef2ff, #ecfeff); }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { font-size: 1.1rem; color: var(--dark); line-height: 1.3; }
.card-title p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.card-head .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.price { font-weight: 800; color: var(--dark); font-size: 1.05rem; white-space: nowrap; }
.price small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; background: #f5f7fc; color: var(--text); font-size: .82rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 4px 10px; border-radius: 6px; background: #eef2ff; color: var(--primary); font-size: .78rem; font-weight: 600; }
.tag.match { background: #d1fae5; color: #047857; }
.tag.match::before { content: '✓ '; }
.tag.muted { background: #f1f3f8; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid #f0f2f8; }
.card-foot .info { color: var(--muted); font-size: .86rem; }
.card-foot .info b { color: var(--dark); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Status badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 50px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-open { background: #e0f2fe; color: #0369a1; }
.st-pending { background: #fef3c7; color: #b45309; }
.st-short { background: #ede9fe; color: #6d28d9; }
.st-hired { background: #d1fae5; color: #047857; }
.st-rejected { background: #fee2e2; color: #b91c1c; }
.st-muted { background: #f1f3f8; color: var(--muted); }
.match-badge { padding: 4px 10px; border-radius: 50px; font-size: .75rem; font-weight: 700; background: linear-gradient(90deg, #d1fae5, #e0f2fe); color: #047857; }

/* ---------- Applicants (client) ---------- */
.applicants { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.applicants.open { grid-template-rows: 1fr; }
.applicants > div { overflow: hidden; }
.applicant-list { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
.applicant { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 16px; border: 1px solid #eceff6; border-radius: 12px; background: #fbfcfe; transition: border-color .3s, background .3s; }
.applicant.hired { border-color: #a7f3d0; background: #f0fdf9; }
.applicant.rejected { opacity: .65; }
.applicant .avatar { width: 48px; height: 48px; }
.ap-main h4 { color: var(--dark); font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-main .sub { color: var(--muted); font-size: .84rem; }
.ap-rate { text-align: right; }
.ap-rate .price { display: block; }
.ap-rate small { color: var(--muted); font-size: .76rem; }
.cover { margin-top: 10px; color: var(--text); font-size: .9rem; line-height: 1.55; white-space: pre-line; }
.cover.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { color: var(--primary); font-weight: 600; font-size: .84rem; margin-top: 4px; }
.link-btn:hover { text-decoration: underline; }
.applicant .actions { grid-column: 2 / -1; margin-top: 4px; }
.contact-line { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: #047857; font-weight: 600; }
.toggle-applicants .arrow { display: inline-block; transition: transform .3s; }
.toggle-applicants.open .arrow { transform: rotate(180deg); }

/* ---------- Team (hired freelancers) ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.member { position: relative; text-align: center; padding: 26px 22px 22px; }
.member::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 70px; border-radius: 16px 16px 0 0; background: linear-gradient(120deg, #eef2ff, #ecfeff); }
.member > * { position: relative; }
.member .avatar { width: 72px; height: 72px; font-size: 1.3rem; margin: 0 auto 12px; border: 4px solid #fff; box-shadow: 0 8px 20px -8px rgba(15,23,72,.35); }
.member h3 { font-size: 1.1rem; color: var(--dark); }
.member .sub { color: var(--muted); font-size: .88rem; }
.member .tags { justify-content: center; }
.member .meta { justify-content: center; }
.member .hired-for { margin-top: 14px; font-size: .82rem; color: var(--muted); }
.member .actions { justify-content: center; margin-top: 16px; }

/* ---------- Hired (freelancer side) ---------- */
.hired-box { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #ecfdf5, #f0fdfa); border: 1px solid #a7f3d0; color: #065f46; font-size: .9rem; }
.hired-box strong { display: block; font-size: .95rem; margin-bottom: 4px; }

/* ---------- Banner ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 14px; margin-bottom: 20px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; animation: fadeUp .5s var(--ease); }
.banner .b-icon { font-size: 1.4rem; }
.banner p { flex: 1; font-size: .92rem; }
.banner strong { color: #78350f; }

/* ---------- Profile editor ---------- */
.profile-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.form-card { padding: 26px; }
.form-card h3 { font-size: 1.15rem; color: var(--dark); margin-bottom: 4px; }
.form-card > p { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fgrid .full { grid-column: 1 / -1; }
.dash-form label, .dash-form .field { display: block; font-weight: 600; font-size: .86rem; color: var(--dark); }
.dash-form .opt-label { color: var(--muted); font-weight: 400; }
.dash-form input, .dash-form select, .dash-form textarea { width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid #dde2f3; border-radius: 10px; font: inherit; font-weight: 400; color: var(--text); background: #fff; transition: border-color .2s, box-shadow .2s; }
.dash-form textarea { resize: vertical; min-height: 110px; }
.dash-form input:focus, .dash-form select:focus, .dash-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,91,234,.12); }
.dash-form .invalid { border-color: #ef4444 !important; background: #fff7f7; box-shadow: 0 0 0 4px rgba(239,68,68,.1) !important; }
.prefix { position: relative; }
.prefix span { position: absolute; left: 14px; top: calc(50% + 3px); transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.prefix input { padding-left: 30px; }
.char-count { display: block; text-align: right; color: #a3aac2; font-size: .76rem; margin-top: 4px; font-weight: 500; }
.char-count.ok { color: #10b981; }

/* Skill chip input */
.skill-box { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 8px; min-height: 48px; border: 1.5px solid #dde2f3; border-radius: 10px; background: #fff; cursor: text; transition: border-color .2s, box-shadow .2s; }
.skill-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47,91,234,.12); }
.skill-box.invalid { border-color: #ef4444; }
.skill-box .tag { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 10px; animation: popIn .3s var(--ease); }
.skill-box .tag button { color: inherit; opacity: .6; font-size: .9rem; line-height: 1; padding: 0 2px; }
.skill-box .tag button:hover { opacity: 1; }
.skill-box input { flex: 1; min-width: 140px; border: none !important; box-shadow: none !important; margin: 0 !important; padding: 6px !important; background: transparent; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.suggest small { width: 100%; color: var(--muted); font-weight: 500; font-size: .78rem; }
.suggest button { padding: 5px 11px; border-radius: 50px; border: 1px dashed #c7d0ea; color: var(--muted); font-size: .8rem; transition: all .2s; }
.suggest button:hover { border-color: var(--primary); color: var(--primary); background: #eef2ff; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* Preview card */
.preview { position: sticky; top: 90px; }
.preview .label { font-size: .75rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.preview .bio { color: var(--muted); font-size: .88rem; margin-top: 12px; line-height: 1.55; white-space: pre-line; }

/* ---------- Apply modal ---------- */
.apply-box { max-width: 560px; }
.apply-job { padding: 14px 16px; border-radius: 12px; background: var(--light); margin: 14px 0 18px; }
.apply-job strong { color: var(--dark); }
.apply-job p { color: var(--muted); font-size: .86rem; }

/* ---------- Empty + skeleton ---------- */
.empty { text-align: center; padding: 56px 24px; background: #fff; border: 1.5px dashed #dfe4f2; border-radius: 18px; animation: fadeUp .5s var(--ease); }
.empty-icon { font-size: 2.6rem; margin-bottom: 10px; animation: float 4s ease-in-out infinite; }
.empty h3 { color: var(--dark); font-size: 1.15rem; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 18px; font-size: .93rem; }
.empty.fatal { margin-top: 40px; }
.skeleton-list { display: flex; flex-direction: column; gap: 16px; }
.skeleton { height: 150px; border-radius: 16px; background: linear-gradient(90deg, #eef0f6 25%, #f7f8fc 50%, #eef0f6 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
.dash-foot { text-align: center; color: #a3aac2; font-size: .82rem; padding: 20px 16px 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
  .preview { position: static; }
}
@media (max-width: 760px) {
  .dash-hero { padding: 24px 20px; }
  .card { padding: 18px; }
  .applicant { grid-template-columns: auto 1fr; }
  .ap-rate { grid-column: 2; text-align: left; }
  .applicant .actions { grid-column: 1 / -1; }
  .fgrid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .sc-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .stat-card strong { font-size: 1.3rem; }
  .card-head .right { display: none; }
  .card-head .right.keep { display: flex; }
}
.card .tags, .member .tags { margin-bottom: 0; }

/* Count bubbles in the navbar links (freelancer pages) */
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #eef2ff; color: var(--primary); font-size: .72rem; font-weight: 700; }
.nav-count[hidden] { display: none; }
/* No black box around tabs/nav links on mouse click (keyboard focus ring kept) */
.dash-tabs button:focus { outline: none; }
.dash-tabs button:focus-visible { outline: 2px solid rgba(47,91,234,.45); outline-offset: 2px; border-radius: 8px; }

/* ---------- Freelancer cards inside the dashboards ---------- */
.avatar-img { object-fit: cover; padding: 0; background: #e4e8f0; }
.avatar.xl { width: 88px; height: 88px; font-size: 1.6rem; }
.tc-hired .meta { margin-top: 0; }
.tc-hired .hired-for { margin-top: 12px; font-size: .82rem; color: var(--muted); }
.tc-email { margin-top: 4px; font-size: .84rem; color: #047857; font-weight: 600; word-break: break-all; }
.tc-hired .actions { margin-top: 12px; }
.preview .preview-card .tcard { max-width: 340px; }
.preview .preview-card .tcard-foot .meta { margin-top: 0; }

/* Profile photo uploader */
.photo-field { display: flex !important; align-items: center; gap: 18px; padding: 14px; border: 1.5px dashed #d6dcef; border-radius: 12px; background: #fafbff; }
.photo-field strong { display: block; font-size: .92rem; color: var(--dark); }
.photo-msg { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; font-size: .8rem; }
.photo-msg.err { color: #dc2626; }
.photo-msg.ok { color: #059669; }
.photo-field .actions { margin-top: 10px; }
.photo-thumb .avatar { box-shadow: 0 8px 20px -10px rgba(15,23,72,.45); border: 3px solid #fff; }

/* "Show on home page" checkbox */
.check-row { display: flex !important; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; background: var(--light); cursor: pointer; }
.check-row input { width: 18px !important; height: 18px; margin: 2px 0 0 !important; padding: 0 !important; accent-color: var(--primary); flex-shrink: 0; }
.check-row b { display: block; font-size: .9rem; }
.check-row small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; margin-top: 2px; }

/* =========================================================
   Full freelancer profile (profile.html)
   ========================================================= */
body.pf-page { background: #fff; }
.pf-sub { font-weight: 400; font-size: 1.25rem; margin-left: 2px; opacity: .9; }
.btn-hire { background: #10b981; color: #fff; box-shadow: 0 10px 22px -12px #10b981; }
.btn-hire:hover { background: #059669; transform: translateY(-2px); }
.pf-main { padding: 40px 0 70px; flex: 1; }
.pf-grid { display: grid; grid-template-columns: 384px 1fr; gap: 44px; align-items: start; }
.pf-left { position: sticky; top: 96px; animation: fadeUp .6s var(--ease) both; }
.pf-photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #dfe3eb; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; animation: pfZoom 1.2s var(--ease) both; }
@keyframes pfZoom { from { transform: scale(1.08); } to { transform: none; } }
.pf-photo.no-photo { display: grid; place-items: center; background: #e4e8f0; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #eef1f6), #dfe3eb); }
.pf-initials { font-size: 5rem; font-weight: 800; letter-spacing: 3px; color: var(--c); }
.pf-notch { width: 62px; height: 62px; }
.pf-notch span { font-size: .78rem; left: 6px; bottom: 7px; }
.pf-avail { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 16px 18px 16px 24px; border-left: 4px solid #10b981; background: #fff; box-shadow: 0 6px 24px -14px rgba(15,23,72,.35); border-radius: 0 10px 10px 0; animation: fadeUp .6s var(--ease) .2s both; }
.pf-avail.off { border-left-color: #f59e0b; }
.pf-avail p { color: #374151; font-size: 1rem; }
.pf-avail small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.pf-avail .yes { color: #059669; font-weight: 600; }
.pf-avail .no { color: #b45309; font-weight: 600; }
.pf-avail .btn { flex-shrink: 0; }
.pf-right { animation: fadeUp .6s var(--ease) .1s both; min-width: 0; }
.pf-right h1 { color: var(--primary); font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.3px; line-height: 1.2; }
.pf-badge { margin-top: 8px; color: #047857; font-size: .95rem; }
.pf-badge svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.pf-badge span { color: #059669; }
.pf-facts { list-style: none; display: grid; gap: 14px; margin-top: 26px; }
.pf-facts li { display: flex; align-items: center; gap: 12px; color: #374151; font-size: 1rem; }
.pf-ic { display: inline-grid; width: 28px; height: 28px; flex-shrink: 0; }
.pf-ic svg { width: 28px; height: 28px; fill: none; stroke: #374151; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.pf-label { margin-top: 28px; font-size: .78rem; letter-spacing: .9px; text-transform: uppercase; color: #374151; font-weight: 500; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pf-chips span { padding: 4px 13px; border: 1px solid var(--primary); border-radius: 50px; color: var(--primary); font-size: .82rem; background: #fff; transition: background .2s, transform .2s; animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 250ms); }
.pf-chips span:hover { background: #eef2ff; transform: translateY(-2px); }
.pf-bio { margin-top: 10px; color: #374151; font-size: 1.05rem; line-height: 1.7; white-space: pre-line; }
.pf-sep { border: 0; border-top: 1px solid #e5e7eb; margin: 34px 0; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pf-cols h2 { font-size: 1.35rem; color: var(--dark); margin-bottom: 14px; }
.pf-box { background: #fff; border: 1px solid #e6e9f2; border-radius: 12px; padding: 18px 20px; }
.pf-box dt { margin-top: 14px; font-size: .74rem; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.pf-box dt:first-child { margin-top: 0; }
.pf-box dd { margin-top: 3px; color: var(--dark); font-weight: 600; }
.pf-box dd.big { font-size: 1.4rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.ap-name { color: var(--dark); }
.ap-name:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: 1fr; gap: 28px; }
  .pf-left { position: static; max-width: 420px; width: 100%; margin: 0 auto; }
  .pf-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pf-avail { flex-direction: column; align-items: flex-start; }
  .pf-sub { display: none; }
}

/* ---------- Freelancer workspace sub-navigation (Find Work / My Applications / My Profile) ---------- */
.fl-subnav { display: flex; gap: 6px; margin: -12px 0 22px; padding: 6px; background: #fff; border: 1px solid #e6e9f2; border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; }
.fl-subnav a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: color .2s, background .2s; }
.fl-subnav a:hover { color: var(--dark); background: var(--light); }
.fl-subnav a.active { color: var(--primary); background: #eef2ff; }
.fl-subnav a.active .nav-count { background: var(--primary); color: #fff; }
.fl-subnav a:focus { outline: none; }
.fl-subnav a:focus-visible { outline: 2px solid rgba(47,91,234,.45); outline-offset: 2px; }

/* ---------- Direct hire offers ---------- */
.offer-to { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--light); }
.offer-to > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.offer-to small { color: var(--muted); font-size: .8rem; }
.offer-to .price { font-weight: 800; color: var(--dark); font-size: 1.05rem; white-space: nowrap; }
.offer-to .price small { font-weight: 500; }
.card.offer-new { border-color: #a7f3d0; box-shadow: 0 14px 34px -24px rgba(16,185,129,.7); }
.offer-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px; border-radius: 14px; background: linear-gradient(90deg, #ecfdf5, #eef2ff); border: 1px solid #a7f3d0; }
.offer-banner p { flex: 1; color: var(--dark); }
.offer-banner .b-icon { font-size: 1.6rem; }
.offer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- My Profile: completeness checklist ---------- */
.checklist { border: 1.5px solid #dbe3fb; background: #f7f9ff; border-radius: 14px; padding: 16px 18px; }
.checklist.all-done { border-color: #a7f3d0; background: #f0fdf7; }
.cl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-head strong { color: var(--dark); font-size: .98rem; }
.cl-head span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.cl-bar { height: 6px; border-radius: 6px; background: #e3e8f6; margin: 10px 0 12px; overflow: hidden; }
.cl-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #10b981); transition: width .5s var(--ease); }
.checklist ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 0; margin: 0; }
.checklist li button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 5px 6px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--primary); background: none; transition: background .2s; }
.checklist li button:hover:not(:disabled) { background: #eaf0ff; }
.checklist li.ok button { color: var(--muted); font-weight: 500; cursor: default; }
.cl-ic { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; border: 2px solid #c3cdea; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.checklist li.ok .cl-ic { background: #10b981; border-color: #10b981; color: #fff; }
.cl-note { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.bio-wrap { display: flex; flex-direction: column; gap: 4px; }
.bio-count { align-self: flex-end; color: var(--muted); font-size: .78rem; font-weight: 500; }
.bio-count.ok { color: #059669; }
@media (max-width: 640px) { .checklist ul { grid-template-columns: 1fr; } }
.rate-hint { display: block; margin-top: 6px; font-size: .78rem; font-weight: 500; color: var(--muted); }
.rate-hint.warn { color: #b45309; }
.rate-hint.bad { color: #dc2626; }

/* =========================================================
   Full profiles – editor sections (My Profile)
   ========================================================= */
.form-divider { margin-top: 14px; padding-top: 20px; border-top: 1px solid #e6e9f2; }
.form-divider strong { display: block; font-size: 1.02rem; color: var(--dark); }
.form-divider small { color: var(--muted); font-size: .85rem; font-weight: 400; }
.rep { border: 1.5px solid #e6e9f2; border-radius: 14px; padding: 18px; background: #fbfcff; outline: none; transition: border-color .2s, box-shadow .2s; }
.rep.invalid { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.rep-head h4 { font-size: 1rem; color: var(--dark); }
.rep-head h4 span { margin-right: 2px; }
.rep-head small { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; margin-top: 2px; }
.rep-list { display: grid; gap: 12px; margin-top: 14px; }
.rep-row { background: #fff; border: 1px solid #e3e7f3; border-radius: 12px; padding: 14px 16px 16px; animation: fadeUp .35s var(--ease); }
.rep-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rep-num { font-size: .74rem; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.rep-remove { color: #dc2626; font-size: .8rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: none; }
.rep-remove:hover { background: #fef2f2; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.rep-grid .full { grid-column: 1 / -1; }
.rep-grid textarea { min-height: 84px; }
.rep-grid input:disabled { background: #f3f4f8; color: #a3aac2; }
.rep-check { margin-top: -2px; }
.rep-empty { margin-top: 12px; color: #a3aac2; font-size: .85rem; }
.rep-add { margin-top: 12px; }

/* =========================================================
   Full profiles – public profile page (profile.html)
   ========================================================= */
.pf-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pf-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #dde2f3; border-radius: 8px; color: #374151; font-size: .88rem; font-weight: 600; background: #fff; transition: border-color .2s, color .2s, transform .2s; }
.pf-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.pf-link-ic { display: inline-grid; width: 18px; height: 18px; }
.pf-link-ic svg { width: 18px; height: 18px; fill: currentColor; }
.pf-link-website .pf-link-ic svg { fill: none; }
.pf-link-linkedin .pf-link-ic { color: #0a66c2; }
.pf-sec { margin-bottom: 38px; }
.pf-sec > h2, .pf-cols h2 { font-size: 1.35rem; color: var(--dark); margin-bottom: 16px; }

/* Work experience timeline */
.pf-timeline { list-style: none; position: relative; padding-left: 30px; }
.pf-timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #e6e9f2; }
.pf-timeline > li { position: relative; padding-bottom: 26px; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.pf-timeline > li:last-child { padding-bottom: 0; }
.pf-dot { position: absolute; left: -30px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #c7d0ea; }
.pf-dot.now { border-color: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.15); }
.pf-tl-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pf-tl-head h3 { font-size: 1.08rem; color: var(--dark); font-weight: 700; }
.pf-company { color: var(--primary); font-weight: 600; margin-top: 2px; }
.pf-when { color: #4b5563; font-size: .9rem; text-align: right; }
.pf-when small { display: block; color: var(--muted); font-size: .8rem; }
.pf-desc { margin-top: 8px; color: #374151; line-height: 1.65; white-space: pre-line; }
.pf-desc-list { margin: 8px 0 0 18px; color: #374151; line-height: 1.65; }
.pf-desc-list li { margin-top: 3px; }

/* Portfolio */
.pf-port { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pf-port-card { display: flex; flex-direction: column; padding: 18px; border: 1px solid #e6e9f2; border-radius: 12px; background: #fff; transition: box-shadow .25s, transform .25s; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 200ms); }
.pf-port-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(15,23,72,.4); }
.pf-port-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; font-weight: 800; font-size: .9rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); margin-bottom: 12px; }
.pf-port-card h3 { font-size: 1rem; color: var(--dark); }
.pf-port-card p { margin-top: 6px; color: #4b5563; font-size: .9rem; line-height: 1.6; flex: 1; white-space: pre-line; }
.pf-port-link { margin-top: 12px; color: var(--primary); font-size: .85rem; font-weight: 600; word-break: break-all; }
.pf-port-link:hover { text-decoration: underline; }

/* Education / certifications */
.pf-list { list-style: none; display: grid; gap: 0; padding: 4px 20px; }
.pf-list li { padding: 14px 0; border-bottom: 1px solid #eef0f6; }
.pf-list li:last-child { border-bottom: 0; }
.pf-list strong { display: block; color: var(--dark); }
.pf-list span { display: block; color: #4b5563; font-size: .92rem; margin-top: 2px; }
.pf-list small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.pf-cred { display: inline-block; margin-top: 6px; color: var(--primary); font-size: .84rem; font-weight: 600; }
.pf-cred:hover { text-decoration: underline; }
.pf-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-langs span { padding: 3px 10px; border-radius: 50px; background: #eef2ff; color: var(--primary); font-size: .84rem; font-weight: 600; }
.pf-langs small { margin-left: 5px; color: var(--muted); font-weight: 500; font-size: .76rem; }

@media (max-width: 760px) {
  .rep { padding: 14px; }
  .rep-grid { grid-template-columns: 1fr; }
  .pf-tl-head { flex-direction: column; gap: 4px; }
  .pf-when { text-align: left; }
}

/* ---------- Payments box on hired freelancer cards ---------- */
.pay-box { margin-top: 16px; padding: 14px; border: 1.5px solid #e6eaf5; border-radius: 12px; background: #f8faff; }
.pay-title { font-weight: 700; font-size: .9rem; margin-bottom: 8px; color: var(--text); }
.pay-row { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; padding: 3px 0; color: var(--muted); }
.pay-row b { color: var(--text); font-weight: 600; text-align: right; }
.pay-row.paid b { color: #047857; }
.pay-note { font-size: .82rem; color: var(--muted); margin: 4px 0 8px; line-height: 1.5; }
.pay-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pay-form { margin-top: 10px; }
.pay-inline { display: flex; gap: 8px; }
.pay-inline input { flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid #dde2f0; border-radius: 8px; font: inherit; font-size: .85rem; background: #fff; }
.pay-inline input:focus { outline: none; border-color: var(--primary); }
.pay-hint { display: block; margin-top: 6px; font-size: .76rem; color: var(--muted); }
.pay-test { margin-top: 8px; font-size: .74rem; color: #b45309; }
