/* =========================================================================
   Freelancers Desk — shared application stylesheet.

   Tokens are copied byte-for-byte from index.php's :root, so an app page and
   the landing page are the same design. Add page-specific rules in a separate
   stylesheet rather than editing tokens here.

   Sections
     1.  Tokens
     2.  Base + reset
     3.  Layout
     4.  Typography
     5.  Buttons
     6.  Nav + footer shell
     7.  Forms
     8.  Step wizard
     9.  Cards
     10. Pills, badges, chips
     11. Tables + lists
     12. Feedback: messages, empty states, toasts
     13. Uploads
     14. Ratings + stats
     15. Modal + drawer
     16. Pagination
     17. Utilities
   ========================================================================= */

/* ============================ 1. TOKENS ============================ */
:root {
    --ink: #14121F;
    --ink-soft: #211D33;
    --ink-softer: #2B2645;
    --porcelain: #F7F4EF;
    --porcelain-dim: #ECE7DD;
    --amber: #FF8A3D;
    --amber-deep: #E86A1E;
    --violet: #6C5CE0;
    --violet-soft: #9A8CF0;
    --mint: #2BD4A6;
    --pink: #E85D75;
    --line: rgba(20, 18, 31, 0.10);
    --line-dark: rgba(247, 244, 239, 0.12);
    --shadow-soft: 0 20px 60px -20px rgba(20, 18, 31, 0.25);
    --shadow-deep: 0 30px 80px -25px rgba(20, 18, 31, 0.55);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Instrument Serif', serif;
    --ease: cubic-bezier(.22, .9, .3, 1);

    /* App-only additions. Nothing above this line may change. */
    --success-bg: rgba(43, 212, 166, 0.14);
    --success-ink: #0d7a5c;
    --error-bg: rgba(232, 93, 117, 0.14);
    --error-ink: #a12d45;
    --warn-bg: rgba(255, 138, 61, 0.16);
    --warn-ink: #8a4408;
    --info-bg: rgba(108, 92, 224, 0.12);
    --info-ink: #4b3ec0;
    --card-shadow: 0 12px 40px -16px rgba(20, 18, 31, 0.18);
    --field-bg: #FFFFFF;
    --muted: rgba(20, 18, 31, 0.58);
    --muted-soft: rgba(20, 18, 31, 0.42);
}

/* ========================= 2. BASE + RESET ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--porcelain);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input,
select,
textarea { font-family: inherit; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 9999;
    background: var(--ink); color: var(--porcelain);
    padding: 14px 22px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================ 3. LAYOUT ============================ */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 48px; } }

/* Narrow column for wizards and auth screens. */
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 24px; }
.wrap-slim { max-width: 620px; margin: 0 auto; padding: 0 24px; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page main { flex: 1; }

.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 8px; }

/* Sidebar + content, the shape used by dashboards and search pages. */
.split { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) {
    .split { grid-template-columns: 280px 1fr; }
    .split-wide { grid-template-columns: 320px 1fr; }
    .split-reverse { grid-template-columns: 1fr 320px; }
}

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Page hero used above wizards and dashboards. */
.page-hero { position: relative; padding: 44px 0 30px; overflow: hidden; }
.page-hero-glow {
    position: absolute; inset: -40% -10% auto -10%; height: 620px;
    background:
        radial-gradient(600px 380px at 18% 10%, rgba(43, 212, 166, 0.18), transparent 70%),
        radial-gradient(700px 460px at 84% 0%, rgba(108, 92, 224, 0.18), transparent 70%);
    pointer-events: none; z-index: 0;
}
.page-hero > .wrap,
.page-hero > .wrap-narrow,
.page-hero > .wrap-slim { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.1; margin: 14px 0 12px; }
.page-hero p.lead { color: var(--muted); font-size: 1.02rem; max-width: 60ch; }

/* ========================= 4. TYPOGRAPHY ========================= */
h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
em { font-family: var(--font-accent); font-style: italic; font-weight: 400; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--amber-deep);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

.muted { color: var(--muted); }
.muted-soft { color: var(--muted-soft); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.strong { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; }

/* Wide, centred digit entry for email / reset codes. */
.field.otp-field input {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section-sub { color: var(--muted); margin-top: 8px; }

.link { color: var(--violet); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* =========================== 5. BUTTONS =========================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 30px; border-radius: 100px; font-weight: 600; font-size: 0.98rem;
    border: 1px solid transparent;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }

.btn-primary { background: var(--amber); color: var(--ink); box-shadow: 0 14px 30px -10px rgba(255, 138, 61, 0.6); }
.btn-primary:hover { background: var(--amber-deep); box-shadow: 0 18px 36px -10px rgba(232, 106, 30, 0.7); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--porcelain); }

.btn-dark { background: var(--ink); color: var(--porcelain); }
.btn-dark:hover { background: var(--mint); color: var(--ink); }

.btn-mint { background: var(--mint); color: var(--ink); box-shadow: 0 14px 30px -12px rgba(43, 212, 166, 0.6); }
.btn-mint:hover { background: #1fc194; }

.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 14px 30px -12px rgba(108, 92, 224, 0.55); }
.btn-violet:hover { background: #5b4bd0; }

.btn-danger { background: transparent; color: var(--error-ink); border-color: rgba(232, 93, 117, 0.4); }
.btn-danger:hover { background: var(--pink); color: #fff; border-color: var(--pink); }

.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-xs { padding: 7px 14px; font-size: 0.78rem; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

section[data-dark] .btn-ghost { color: var(--porcelain); border-color: var(--line-dark); }
section[data-dark] .btn-ghost:hover { background: var(--porcelain); color: var(--ink); }

/* Text-only and icon-only actions. */
.text-btn {
    background: none; border: none; padding: 0; color: var(--violet);
    font-weight: 600; font-size: 0.9rem; text-decoration: underline;
    text-underline-offset: 3px;
}
.text-btn:hover { color: var(--ink); }
.text-btn.danger { color: var(--error-ink); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--field-bg); color: var(--ink);
    flex-shrink: 0; transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--ink); color: var(--porcelain); border-color: var(--ink); }
.icon-btn.danger:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.icon-btn-sm { width: 30px; height: 30px; }

/* ======================= 6. NAV + FOOTER SHELL ======================= */
.nav { position: sticky; top: 0; z-index: 500; padding: 14px 0; }
.nav-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: rgba(247, 244, 239, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(20, 18, 31, 0.08);
    border-radius: 100px; padding: 10px 10px 10px 22px;
    box-shadow: 0 8px 30px -12px rgba(20, 18, 31, 0.12);
}

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.logo-sub {
    display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem;
    color: rgba(20, 18, 31, 0.5); letter-spacing: .04em; text-transform: uppercase; margin-top: 1px;
}
.logo-mark {
    width: 30px; height: 30px; border-radius: 10px;
    background: linear-gradient(135deg, var(--mint), var(--violet));
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-mark svg { width: 16px; height: 16px; }

.nav-links { display: none; gap: 26px; align-items: center; font-size: 0.92rem; font-weight: 500; }
.nav-links a { opacity: .82; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-links a[aria-current="page"] { opacity: 1; font-weight: 600; color: var(--violet); }
@media (min-width: 1080px) { .nav-links { display: flex; } }

.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .btn { padding: 11px 18px; font-size: 0.88rem; }
.nav-cta .btn-text { display: none; padding: 11px 10px; opacity: .75; font-weight: 500; font-size: 0.9rem; }
@media (min-width: 640px) { .nav-cta .btn-text { display: inline-flex; } }
.nav-cta .btn-ghost { display: none; }
@media (min-width: 640px) { .nav-cta .btn-ghost { display: inline-flex; } }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
    background: transparent; color: var(--ink); flex-shrink: 0;
}
@media (min-width: 1080px) { .nav-toggle { display: none; } }

.nav-mobile {
    display: none; flex-direction: column; gap: 4px; margin-top: 10px;
    background: var(--porcelain); border: 1px solid var(--line); border-radius: 20px;
    padding: 10px; box-shadow: var(--shadow-soft);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a { padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.nav-mobile a:hover { background: var(--porcelain-dim); }
.nav-mobile hr { border: none; border-top: 1px solid var(--line); margin: 6px 8px; }

/* Signed-in nav: avatar, role switcher, notification bell. */
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--violet), var(--mint));
    color: #fff; font-weight: 700; font-size: 0.85rem; overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.7);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-menu-wrap { position: relative; }
.nav-menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 600;
    min-width: 250px; display: none; flex-direction: column; gap: 2px;
    background: var(--porcelain); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 10px; box-shadow: var(--shadow-soft);
}
.nav-menu.is-open { display: flex; }
.nav-menu a,
.nav-menu button {
    display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
    padding: 10px 12px; border-radius: 10px; border: none; background: none;
    font-size: 0.9rem; font-weight: 500; color: var(--ink);
}
.nav-menu a:hover,
.nav-menu button:hover { background: var(--porcelain-dim); }
.nav-menu-head { padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.nav-menu-head strong { display: block; font-size: 0.95rem; }
.nav-menu-head span { font-size: 0.8rem; color: var(--muted); }
.nav-menu-sep { border: none; border-top: 1px solid var(--line); margin: 6px 4px; }

/* Freelancer / client context switcher. */
.role-switch {
    display: inline-flex; padding: 3px; border-radius: 100px;
    background: rgba(20, 18, 31, 0.06); border: 1px solid var(--line);
}
.role-switch button {
    border: none; background: none; padding: 7px 16px; border-radius: 100px;
    font-size: 0.82rem; font-weight: 600; color: var(--muted);
    transition: background .25s, color .25s;
}
.role-switch button.is-active { background: var(--ink); color: var(--porcelain); }

.nav-bell { position: relative; }
.nav-badge {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 100px; background: var(--pink); color: #fff;
    font-size: 0.66rem; font-weight: 700; display: none;
    align-items: center; justify-content: center; line-height: 1;
}
.nav-badge.is-visible { display: flex; }

/* Footer, identical to the landing page. */
.footer { background: var(--ink); color: var(--porcelain); padding: 70px 0 30px; }
.footer-top {
    display: grid; grid-template-columns: 1fr; gap: 40px;
    padding-bottom: 50px; border-bottom: 1px solid var(--line-dark);
}
@media (min-width: 780px) { .footer-top { grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr; } }
.footer-brand p { color: rgba(247, 244, 239, 0.55); font-size: 0.92rem; margin-top: 14px; max-width: 32ch; }
.footer-col h5 {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: .08em;
    color: rgba(247, 244, 239, 0.45); margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.92rem; color: rgba(247, 244, 239, 0.78); transition: color .2s; }
.footer-col a:hover { color: var(--mint); }
.newsletter-row { display: flex; gap: 8px; margin-top: 16px; }
.newsletter-row input {
    flex: 1; min-width: 0; background: rgba(247, 244, 239, 0.06);
    border: 1px solid var(--line-dark); border-radius: 100px;
    padding: 12px 18px; color: var(--porcelain);
}
.newsletter-row input::placeholder { color: rgba(247, 244, 239, 0.4); }
.newsletter-row button { background: var(--mint); color: var(--ink); border: none; border-radius: 100px; padding: 0 20px; font-weight: 700; }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
    padding-top: 26px; font-size: 0.82rem; color: rgba(247, 244, 239, 0.45);
}
.social-row { display: flex; gap: 14px; }
.social-row a {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-dark);
    display: flex; align-items: center; justify-content: center;
    color: rgba(247, 244, 239, 0.7); transition: color .2s, border-color .2s;
}
.social-row a:hover { color: var(--mint); border-color: var(--mint); }

/* ============================ 7. FORMS ============================ */
.form-card {
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--card-shadow);
}
@media (min-width: 720px) { .form-card { padding: 38px; } }

.form-section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.form-section:first-child { padding-top: 0; }
.form-section:last-child { border-bottom: none; padding-bottom: 0; }
.form-section > h3 { font-size: 1.15rem; margin-bottom: 6px; }
.form-section > .hint { margin-bottom: 18px; }

.field-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .field-grid.two { grid-template-columns: repeat(2, 1fr); }
    .field-grid.three { grid-template-columns: repeat(3, 1fr); }
}
.field-grid .span-2 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label,
.field-label { font-size: 0.88rem; font-weight: 600; }
.req { color: var(--pink); margin-left: 2px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="search"],
.field select,
.field textarea {
    width: 100%; background: var(--field-bg); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 13px 15px; font-size: 0.95rem;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field textarea.tall { min-height: 220px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none; border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(108, 92, 224, 0.14);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-soft); }

.field input:disabled,
.field select:disabled,
.field textarea:disabled { background: var(--porcelain-dim); color: var(--muted); cursor: not-allowed; }

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2314121F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 15px center;
    padding-right: 42px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--pink); }

.hint { font-size: 0.82rem; color: var(--muted); }
.hint-inline { font-size: 0.82rem; color: var(--muted); margin-left: auto; }

.char-count { font-size: 0.78rem; color: var(--muted-soft); text-align: right; font-variant-numeric: tabular-nums; }
.char-count.is-over { color: var(--error-ink); font-weight: 600; }

/* Prefixed inputs: currency, rate, hours. */
.input-affix {
    display: flex; align-items: center; background: var(--field-bg);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.input-affix:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108, 92, 224, 0.14); }
.input-affix input { border: none !important; box-shadow: none !important; flex: 1; min-width: 0; }
.input-affix input:focus { outline: none; }
.affix {
    padding: 13px 14px; background: var(--porcelain-dim); color: var(--muted);
    font-size: 0.9rem; font-weight: 600; flex-shrink: 0; white-space: nowrap;
}
.affix-end { border-left: 1px solid var(--line); }
.affix-start { border-right: 1px solid var(--line); }

/* Radio and checkbox pills, selected via :has(). */
.check-row { display: flex; flex-wrap: wrap; gap: 10px; }
.check-col { display: flex; flex-direction: column; gap: 10px; }

.check-pill,
.radio-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 100px;
    border: 1px solid var(--line); background: var(--field-bg);
    font-size: 0.9rem; font-weight: 500; cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.check-pill input,
.radio-pill input { accent-color: var(--violet); margin: 0; }
.check-pill:hover,
.radio-pill:hover { border-color: var(--violet-soft); }
.check-pill:has(input:checked),
.radio-pill:has(input:checked) {
    border-color: var(--violet); background: var(--info-bg);
    box-shadow: 0 0 0 1px var(--violet) inset; font-weight: 600;
}
.check-pill:has(input:disabled),
.radio-pill:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* Full-width option cards, for wizard choices with descriptions. */
.option-card {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 18px 20px; border-radius: var(--radius-md);
    border: 1.5px solid var(--line); background: var(--field-bg);
    cursor: pointer; transition: border-color .2s, background .2s, transform .3s var(--ease);
}
.option-card:hover { border-color: var(--violet-soft); transform: translateY(-2px); }
.option-card:has(input:checked) { border-color: var(--violet); background: var(--info-bg); }
.option-card input { accent-color: var(--violet); margin-top: 3px; flex-shrink: 0; }
.option-card-body strong { display: block; font-size: 0.98rem; font-weight: 600; }
.option-card-body span { display: block; font-size: 0.86rem; color: var(--muted); margin-top: 3px; }

/* Toggle switch, for visibility and availability settings. */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
    width: 46px; height: 26px; border-radius: 100px; background: rgba(20, 18, 31, 0.18);
    position: relative; flex-shrink: 0; transition: background .25s;
}
.switch-track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(20, 18, 31, 0.25);
}
.switch input:checked + .switch-track { background: var(--mint); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }

/* Repeatable sections: education rows, milestones, portfolio items. */
.dynamic-list { display: flex; flex-direction: column; gap: 14px; }
.dynamic-row {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 16px; border: 1px solid var(--line);
    border-radius: var(--radius-md); background: var(--porcelain);
}
.dynamic-row > .field-grid { flex: 1; }
.dynamic-empty {
    padding: 22px; border: 1.5px dashed var(--line); border-radius: var(--radius-md);
    text-align: center; color: var(--muted); font-size: 0.9rem;
}

/* Skill / token autocomplete. */
.token-field {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 10px 12px; min-height: 52px;
    transition: border-color .2s, box-shadow .2s;
}
.token-field:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(108, 92, 224, 0.14); }
.token-field input { border: none !important; background: transparent; flex: 1; min-width: 140px; padding: 4px; outline: none; }
.token {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 8px 6px 13px; border-radius: 100px;
    background: var(--info-bg); color: var(--ink);
    font-size: 0.84rem; font-weight: 500;
}
.token button {
    border: none; background: rgba(20, 18, 31, 0.1); color: var(--ink);
    width: 18px; height: 18px; border-radius: 50%; line-height: 1;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.token button:hover { background: var(--pink); color: #fff; }

.autocomplete { position: relative; }
.autocomplete-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 400;
    max-height: 260px; overflow-y: auto; display: none;
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); padding: 6px;
}
.autocomplete-list.is-open { display: block; }
.autocomplete-list li { padding: 9px 12px; border-radius: 8px; font-size: 0.9rem; cursor: pointer; }
.autocomplete-list li:hover,
.autocomplete-list li.is-active { background: var(--info-bg); }
.autocomplete-list li .meta { font-size: 0.78rem; color: var(--muted); margin-left: 6px; }

.form-actions {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    justify-content: space-between; padding-top: 28px; margin-top: 8px;
    border-top: 1px solid var(--line);
}
.form-actions .spacer { flex: 1; }

.readonly-field {
    padding: 13px 15px; border-radius: var(--radius-sm);
    background: var(--porcelain-dim); border: 1px solid var(--line);
    font-size: 0.95rem; color: var(--muted);
}

.fieldset-reset { border: none; padding: 0; margin: 0; }
.fieldset-reset > legend { padding: 0; font-size: 0.88rem; font-weight: 600; margin-bottom: 9px; }

/* ========================= 8. STEP WIZARD ========================= */
.step-shell { padding-bottom: 70px; }

.step-progress {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding: 18px 0 26px;
}
.step-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
    background: rgba(20, 18, 31, 0.05); color: var(--muted);
    border: 1px solid transparent;
}
.step-pill .num {
    width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 18, 31, 0.12); font-size: 0.7rem; line-height: 1;
}
.step-pill.is-done { background: var(--success-bg); color: var(--success-ink); }
.step-pill.is-done .num { background: var(--mint); color: var(--ink); }
.step-pill.is-active {
    background: var(--ink); color: var(--porcelain); border-color: var(--ink);
    box-shadow: 0 8px 20px -10px rgba(20, 18, 31, 0.5);
}
.step-pill.is-active .num { background: var(--amber); color: var(--ink); }
.step-pill.is-locked { opacity: .55; }

.step-bar { height: 6px; border-radius: 100px; background: rgba(20, 18, 31, 0.08); overflow: hidden; }
.step-bar span {
    display: block; height: 100%; border-radius: 100px;
    background: linear-gradient(90deg, var(--mint), var(--violet));
    transition: width .6s var(--ease);
}
.step-count { font-size: 0.82rem; font-weight: 600; color: var(--muted); }

.step-nav { display: flex; gap: 10px; align-items: center; }

/* ============================ 9. CARDS ============================ */
.card {
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 22px;
    box-shadow: var(--card-shadow);
}
.card-flat { box-shadow: none; }
.card-tight { padding: 16px; }
.card-lg { border-radius: var(--radius-lg); padding: 30px; }

.card-hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.card-hover:hover {
    transform: translateY(-4px); border-color: var(--violet-soft);
    box-shadow: 0 26px 60px -26px rgba(20, 18, 31, 0.3);
}

.card-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; margin-bottom: 14px;
}
.card-head h3 { font-size: 1.05rem; }
.card-title { font-size: 1.05rem; font-weight: 600; font-family: var(--font-display); }
.card-title a:hover { color: var(--violet); }
.card-foot {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    justify-content: space-between; margin-top: 16px;
    padding-top: 16px; border-top: 1px solid var(--line);
}
.card-dark { background: var(--ink-soft); color: var(--porcelain); border-color: var(--line-dark); }
.card-dark .muted { color: rgba(247, 244, 239, 0.6); }

/* Sidebar panel used for filters and summaries. */
.panel {
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 20px;
}
.panel + .panel { margin-top: 18px; }
.panel h4 { font-size: 0.95rem; margin-bottom: 14px; }
.panel-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.panel-group:last-child { border-bottom: none; padding-bottom: 0; }
.panel-group > h5 {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); margin-bottom: 11px;
}
.panel-sticky { position: sticky; top: 90px; }

/* Profile / job / talent card avatar block. */
.avatar {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--violet), var(--mint));
    color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 0.82rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-xl { width: 130px; height: 130px; font-size: 2.4rem; border: 4px solid var(--field-bg); }

.avatar-online { position: relative; }
.avatar-online::after {
    content: ''; position: absolute; right: 1px; bottom: 1px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--mint); border: 2px solid var(--field-bg);
}

/* ====================== 10. PILLS, BADGES, CHIPS ====================== */
.tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 100px;
    background: rgba(20, 18, 31, 0.06); color: var(--ink);
    font-size: 0.78rem; font-weight: 500; white-space: nowrap;
}
.tag-violet { background: var(--info-bg); color: var(--info-ink); }
.tag-mint { background: var(--success-bg); color: var(--success-ink); }
.tag-amber { background: var(--warn-bg); color: var(--warn-ink); }
.tag-pink { background: var(--error-bg); color: var(--error-ink); }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 100px;
    font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
    text-transform: uppercase; white-space: nowrap;
}
.badge-rising { background: var(--warn-bg); color: var(--warn-ink); }
.badge-top { background: var(--info-bg); color: var(--info-ink); }
.badge-top-plus { background: var(--ink); color: var(--amber); }
.badge-vetted { background: linear-gradient(135deg, var(--violet), var(--mint)); color: #fff; }
.badge-verified { background: var(--success-bg); color: var(--success-ink); }

/* Status dots for jobs, proposals, contracts, milestones. */
.status {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 600;
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-open,
.status-active,
.status-released,
.status-hired { color: var(--success-ink); }
.status-draft,
.status-pending,
.status-submitted { color: var(--muted); }
.status-paused,
.status-funded,
.status-shortlisted,
.status-interviewing { color: var(--warn-ink); }
.status-closed,
.status-declined,
.status-withdrawn,
.status-cancelled,
.status-expired { color: var(--error-ink); }
.status-filled { color: var(--info-ink); }

/* ======================= 11. TABLES + LISTS ======================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--field-bg); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th,
table.data td { padding: 14px 16px; text-align: left; }
table.data thead th {
    background: var(--porcelain-dim); font-size: 0.76rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
    white-space: nowrap;
}
table.data tbody tr + tr { border-top: 1px solid var(--line); }
table.data tbody tr:hover { background: rgba(108, 92, 224, 0.04); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

.list-rows { display: flex; flex-direction: column; gap: 14px; }
.list-row {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 18px 20px; background: var(--field-bg);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    transition: border-color .25s, box-shadow .25s;
}
.list-row:hover { border-color: var(--violet-soft); box-shadow: var(--card-shadow); }
.list-row-body { flex: 1; min-width: 0; }
.list-row-aside { flex-shrink: 0; text-align: right; }
.list-row.is-unread { border-left: 3px solid var(--violet); }

.meta-row {
    display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
    font-size: 0.84rem; color: var(--muted); margin-top: 8px;
}
.meta-row > span { display: inline-flex; align-items: center; gap: 6px; }
.meta-sep { color: var(--muted-soft); }

.definition-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .definition-list { grid-template-columns: repeat(2, 1fr); } }
.definition-list dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.definition-list dd { margin: 4px 0 0; font-size: 0.95rem; font-weight: 500; }

/* ============ 12. FEEDBACK: MESSAGES, EMPTY STATES, TOASTS ============ */
.form-message {
    display: none; padding: 13px 17px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; margin-top: 18px;
}
.form-message.show { display: block; }
.form-message.success { background: var(--success-bg); color: var(--success-ink); }
.form-message.error { background: var(--error-bg); color: var(--error-ink); }
.form-message.info { background: var(--info-bg); color: var(--info-ink); }
.form-message.warn { background: var(--warn-bg); color: var(--warn-ink); }

.info-note {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 15px 18px; border-radius: var(--radius-sm);
    background: var(--info-bg); font-size: 0.88rem; line-height: 1.55;
}
.info-note svg { flex-shrink: 0; margin-top: 2px; color: var(--violet); }
.info-note.warn { background: var(--warn-bg); }
.info-note.warn svg { color: var(--amber-deep); }

.empty-state {
    text-align: center; padding: 60px 24px;
    border: 1.5px dashed var(--line); border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.5);
}
.empty-state svg { margin: 0 auto 18px; color: var(--muted-soft); }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 44ch; margin: 0 auto 22px; }

.toast-stack {
    position: fixed; right: 20px; bottom: 20px; z-index: 900;
    display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
    padding: 14px 18px; border-radius: var(--radius-sm);
    background: var(--ink); color: var(--porcelain);
    font-size: 0.9rem; box-shadow: var(--shadow-deep);
    animation: toast-in .35s var(--ease);
}
.toast.success { background: var(--success-ink); }
.toast.error { background: var(--error-ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Skeleton placeholders while a list loads. */
.skeleton {
    background: linear-gradient(90deg, rgba(20, 18, 31, 0.06) 25%, rgba(20, 18, 31, 0.11) 37%, rgba(20, 18, 31, 0.06) 63%);
    background-size: 400% 100%; border-radius: var(--radius-sm);
    animation: skeleton 1.4s ease-in-out infinite;
}
.skeleton-line { height: 13px; margin-bottom: 9px; }
.skeleton-line.short { width: 45%; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.spinner {
    width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================== 13. UPLOADS =========================== */
.file-box {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 26px 22px; text-align: center;
    border: 1.5px dashed var(--violet-soft); border-radius: var(--radius-md);
    background: rgba(108, 92, 224, 0.04); cursor: pointer;
    transition: background .25s, border-color .25s;
}
.file-box:hover,
.file-box.is-dragover { background: var(--info-bg); border-color: var(--violet); }
.file-box input[type="file"] { display: none; }
.file-box svg { color: var(--violet); }
.file-box strong { font-size: 0.93rem; }
.file-box span { font-size: 0.8rem; color: var(--muted); }

.file-list { display: flex; flex-direction: column; gap: 9px; }
.file-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    background: var(--porcelain-dim); font-size: 0.88rem;
}
.file-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item .size { color: var(--muted); font-size: 0.8rem; flex-shrink: 0; }

.preview-image {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--field-bg); box-shadow: var(--card-shadow);
}
.preview-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); }

/* ======================= 14. RATINGS + STATS ======================= */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--amber); }
.stars svg { width: 14px; height: 14px; }
.stars .empty { color: rgba(20, 18, 31, 0.18); }
.rating-value { font-weight: 700; font-size: 0.9rem; }
.rating-count { font-size: 0.82rem; color: var(--muted); }

.star-input { display: inline-flex; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { cursor: pointer; color: rgba(20, 18, 31, 0.18); transition: color .15s, transform .2s var(--ease); }
.star-input label svg { width: 27px; height: 27px; }
.star-input label:hover { transform: scale(1.12); }
.star-input.is-filled-1 label:nth-of-type(-n+1),
.star-input.is-filled-2 label:nth-of-type(-n+2),
.star-input.is-filled-3 label:nth-of-type(-n+3),
.star-input.is-filled-4 label:nth-of-type(-n+4),
.star-input.is-filled-5 label:nth-of-type(-n+5) { color: var(--amber); }

.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 780px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
    padding: 18px 20px; border-radius: var(--radius-md);
    background: var(--field-bg); border: 1px solid var(--line);
}
.stat .value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat .label { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.stat .delta { font-size: 0.78rem; font-weight: 600; margin-top: 6px; }
.stat .delta.up { color: var(--success-ink); }
.stat .delta.down { color: var(--error-ink); }

/* Job Success Score meter. */
.meter { height: 8px; border-radius: 100px; background: rgba(20, 18, 31, 0.08); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 100px; background: var(--mint); transition: width .6s var(--ease); }
.meter.is-mid span { background: var(--amber); }
.meter.is-low span { background: var(--pink); }

/* ======================= 15. MODAL + DRAWER ======================= */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 800; display: none;
    align-items: center; justify-content: center; padding: 24px;
    background: rgba(20, 18, 31, 0.55); backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { display: flex; }
.modal {
    width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
    background: var(--porcelain); border-radius: var(--radius-lg);
    padding: 30px; box-shadow: var(--shadow-deep);
    animation: modal-in .3s var(--ease);
}
.modal-lg { max-width: 800px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h3 { font-size: 1.25rem; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 26px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 800;
    width: min(420px, 100%); background: var(--porcelain);
    box-shadow: var(--shadow-deep); padding: 26px;
    transform: translateX(100%); transition: transform .35s var(--ease);
    overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }

/* ========================= 16. PAGINATION ========================= */
.pagination { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: center; margin-top: 32px; }
.pagination a,
.pagination span {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); border: 1px solid var(--line);
    background: var(--field-bg); font-size: 0.88rem; font-weight: 600;
    transition: background .2s, color .2s, border-color .2s;
}
.pagination a:hover { border-color: var(--violet); color: var(--violet); }
.pagination .is-current { background: var(--ink); color: var(--porcelain); border-color: var(--ink); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

.result-count { font-size: 0.88rem; color: var(--muted); }

/* Sort / view toolbar above a result list. */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    justify-content: space-between; margin-bottom: 20px;
}
.toolbar select {
    border: 1px solid var(--line); border-radius: 100px; background: var(--field-bg);
    padding: 9px 16px; font-size: 0.86rem; font-weight: 500;
}

/* Search bar reused from the landing hero. */
.search-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--field-bg); border: 1px solid var(--line);
    border-radius: 20px; padding: 6px 8px 6px 20px;
}
.search-row svg { flex-shrink: 0; opacity: .55; }
.search-row input {
    border: none; background: transparent; flex: 1; min-width: 0;
    font-size: 1rem; padding: 14px 4px; color: var(--ink); outline: none;
}
.search-row input::placeholder { color: var(--muted-soft); }
.search-row button {
    background: var(--ink); color: var(--porcelain); border: none;
    padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: 0.92rem;
    flex-shrink: 0; transition: transform .3s var(--ease), background .3s;
}
.search-row button:hover { background: var(--mint); color: var(--ink); transform: translateY(-2px); }

/* ========================== 17. UTILITIES ========================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: .08s; }
.reveal-delay-2.is-visible { transition-delay: .16s; }
.reveal-delay-3.is-visible { transition-delay: .24s; }

.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.full { width: 100%; }
.flex-1 { flex: 1; min-width: 0; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Long-form rendering for job descriptions and profile overviews. */
.prose { font-size: 0.97rem; line-height: 1.72; color: rgba(20, 18, 31, 0.82); white-space: pre-line; }
.prose strong { color: var(--ink); }

@media print {
    .nav, .footer, .form-actions, .toast-stack { display: none !important; }
    body { background: #fff; }
}
