/* ==========================================================================
   PropNest - Upwork UI Style + LinkedIn UX Flow
   Theme Palette:
   - Primary Green: #108a00 / #14a800 (Upwork signature green)
   - Dark Text / Accent: #001e00 / #181818
   - Background: #f7faf7 / #f2f4f7
   - Cards & Surface: #ffffff
   - Borders: #e4ebe4 / #e0e0e0
   - Accent Blue (Trust/LinkedIn touch): #0073b1
   ========================================================================== */

:root {
    --primary: #108a00;
    --primary-hover: #14a800;
    --primary-light: #eef9ee;
    --primary-border: #91e687;
    --text-main: #001e00;
    --text-muted: #5e6d55;
    --text-secondary: #656565;
    --bg-page: #f7faf7;
    --bg-surface: #ffffff;
    --border-subtle: #e4ebe4;
    --border-card: #d5e0d5;
    --badge-gold: #e58b00;
    --badge-gold-bg: #fff8e6;
    --badge-blue: #0073b1;
    --badge-blue-bg: #eaf4fb;
    --shadow-sm: 0 1px 3px rgba(0, 30, 0, 0.05);
    --shadow-md: 0 4px 14px rgba(0, 30, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 30, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---------------- Top Navbar (LinkedIn UX + Upwork Aesthetic) ---------------- */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-badge {
    background: var(--primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
}

.nav-search {
    position: relative;
    width: 280px;
}

.nav-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-card);
    background: #fdfdfd;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.nav-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 138, 0, 0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

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

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.nav-badge-pill {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #e32636;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.role-switch-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* ---------------- Layout & View Container ---------------- */
.app-container {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 20px;
}

.view-section {
    display: none;
}

.view-section.active-view {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Upwork/LinkedIn Hero Banner ---------------- */
.hero-card {
    background: linear-gradient(135deg, #001e00 0%, #0c3809 100%);
    color: white;
    padding: 32px 36px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.hero-content h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 15px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 24px;
    background: rgba(255, 255, 255, 0.08);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat-item h3 {
    font-size: 22px;
    color: #49e838;
}

.hero-stat-item p {
    font-size: 12px;
    opacity: 0.8;
}

/* ---------------- 3-Column LinkedIn Feed Layout ---------------- */
.feed-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    align-items: start;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

/* Left Sidebar Profile Card */
.profile-card-mini {
    text-align: center;
    padding: 0;
    overflow: hidden;
}

.profile-cover {
    height: 70px;
    background: linear-gradient(90deg, #108a00, #225a1e);
}

.profile-avatar-wrapper {
    margin-top: -38px;
    position: relative;
    display: inline-block;
}

.avatar-lg {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
}

.verified-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #0073b1;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid white;
}

.profile-details {
    padding: 12px 16px 16px;
}

.profile-details h3 {
    font-size: 16px;
    font-weight: 700;
}

.profile-headline {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.pill-licence {
    display: inline-block;
    background: var(--badge-blue-bg);
    color: var(--badge-blue);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin-top: 8px;
}

.profile-stats-divider {
    border-top: 1px solid var(--border-subtle);
    margin-top: 14px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    text-align: left;
}

/* Post Composer (Feed) */
.composer-card {
    padding: 16px 20px;
}

.composer-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.composer-btn-input {
    flex: 1;
    text-align: left;
    background: #f7faf7;
    border: 1px solid var(--border-card);
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.composer-btn-input:hover {
    background: #edf3ed;
    border-color: var(--primary);
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}

.composer-action-btn {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.composer-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-referral-special {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

/* Feed Post (LinkedIn Flow + Upwork Card Design) */
.feed-post {
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-author {
    display: flex;
    gap: 12px;
}

.post-author-info h4 {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-author-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-reco {
    background: #eef4fb;
    color: #0b66c2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.badge-fsra {
    background: #e6f6ec;
    color: #108a00;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.badge-referral-tag {
    background: #fff3d6;
    color: #8c5700;
    border: 1px solid #ffd57a;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-content {
    font-size: 14px;
    line-height: 1.6;
    color: #2b3b2b;
    margin-bottom: 14px;
}

.referral-box {
    background: #fcfdfc;
    border: 1px solid var(--border-card);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 12px 0;
}

.referral-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    margin-top: 8px;
}

.referral-grid span strong {
    color: var(--text-main);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    margin-top: 12px;
}

.post-interaction-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.post-interaction-btn:hover {
    background: #f2f6f2;
    color: var(--primary);
}

/* ---------------- "Find a Pro" Marketplace (Upwork Style) ---------------- */
.find-pro-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.filter-sidebar {
    position: sticky;
    top: 84px;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 16px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--text-main);
}

.filter-select, .filter-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    font-size: 13px;
    background: #fff;
    outline: none;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-label input {
    accent-color: var(--primary);
}

/* Pro Listing Card (Upwork Talent Card Style) */
.pro-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s;
    position: relative;
}

.pro-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pro-card.sponsored-pro {
    border-left: 4px solid var(--badge-gold);
    background: #fffdfa;
}

.sponsored-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 11px;
    background: var(--badge-gold-bg);
    color: var(--badge-gold);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid #ffe1a6;
}

.pro-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.pro-avatar-container {
    position: relative;
}

.pro-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.online-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #108a00;
    border-radius: 50%;
    border: 2px solid #fff;
}

.pro-main-meta {
    flex: 1;
}

.pro-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pro-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.top-rated-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pro-headline-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.pro-location {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pro-pricing-box {
    text-align: right;
    min-width: 140px;
}

.price-headline {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.price-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.pro-stats-row {
    display: flex;
    gap: 20px;
    margin: 14px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}

.pro-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-star {
    color: #e58b00;
}

.pro-bio-snippet {
    font-size: 14px;
    color: #3c4b3c;
    line-height: 1.5;
    margin-bottom: 14px;
}

.pro-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag-pill {
    background: #f1f4f1;
    color: #344734;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: 500;
}

.pro-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* Buttons (Upwork Styling) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: #f2f5f2;
    color: var(--text-main);
    border: 1px solid var(--border-card);
}

.btn-secondary:hover {
    background: #e5ebe5;
}

/* Comparison Bar (Sticky Bottom) */
.comparison-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #001e00;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    display: none;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.comparison-bar.active {
    display: flex;
}

/* ---------------- Deal Room (Contract & Collaboration Workspace) ---------------- */
.dealroom-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.deal-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.milestone-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 24px;
}

.milestone-stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-card);
    z-index: 1;
}

.milestone-progress-line {
    position: absolute;
    top: 14px;
    left: 40px;
    width: 60%;
    height: 3px;
    background: var(--primary);
    z-index: 2;
    transition: width 0.3s;
}

.step-node {
    position: relative;
    z-index: 3;
    background: var(--bg-surface);
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--border-card);
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.step-node.completed .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-node.active .step-circle {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 138, 0, 0.2);
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.step-node.active .step-label {
    color: var(--primary);
}

.dealroom-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.chat-box {
    display: flex;
    flex-direction: column;
    height: 520px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.5;
}

.chat-msg.incoming {
    align-self: flex-start;
    background: #f2f5f2;
    border: 1px solid var(--border-subtle);
}

.chat-msg.outgoing {
    align-self: flex-end;
    background: var(--primary);
    color: white;
}

.chat-input-bar {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-subtle);
    padding: 12px;
}

.chat-input-bar input {
    flex: 1;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-card);
    outline: none;
}

/* ---------------- Leads CRM (Kanban for Pros) ---------------- */
.crm-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.kanban-column {
    background: #f4f7f4;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px;
    min-height: 500px;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.kanban-item {
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.15s;
}

.kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lead-score-pill {
    background: #e6f6ec;
    color: #108a00;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* ---------------- Modals (Lead Request, Contact Mask, Comparison) ---------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 30, 0, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #fff;
    width: 650px;
    max-width: 90vw;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fbfdfb;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .feed-grid {
        grid-template-columns: 1fr;
    }
    .find-pro-layout {
        grid-template-columns: 1fr;
    }
    .crm-kanban-board {
        grid-template-columns: 1fr 1fr;
    }
    .dealroom-grid {
        grid-template-columns: 1fr;
    }
}
