/* =============================================
   JobSucks — Professional Corporate Design
   US Flag Colors: Navy #002868, Red #BF0A30, White
   ============================================= */

/* ─── CSS Variables ─────────────────────────── */
:root {
    --primary: #002868;
    --primary-light: #1a4a8a;
    --primary-dark: #001a44;
    --accent: #BF0A30;
    --accent-2: #0052A5;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --bg: #ffffff;
    --bg-card: #f8f9fa;
    --bg-glass: #ffffff;
    --border: #e2e8f0;
    --text: #334155;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --max-width: 1200px;
}

/* ─── Reset & Base ──────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

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

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.2;
}

/* ─── Container ─────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-md {
    max-width: var(--max-width);
}

/* ─── Card ──────────────────────────────────── */
.glass-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.glass-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ─── Animations ────────────────────────────── */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .7;
    }
}

/* ─── Navbar ────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #002868;
    border-bottom: 2px solid #BF0A30;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    margin: 5px 0;
    transition: var(--transition);
}

.btn-nav-login {
    color: #ffffff !important;
}

.btn-nav-signup {
    background: #BF0A30 !important;
    color: #fff !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 1.25rem !important;
}

.btn-nav-signup:hover {
    background: #d41040 !important;
}

/* Nav User Menu */
.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    cursor: pointer;
    color: #ffffff;
    transition: var(--transition);
}

.nav-user-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    min-width: 160px;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    border-radius: 6px;
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: #f1f5f9;
    color: var(--text-heading);
}

.logout-link {
    color: var(--danger) !important;
}

.badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 50px;
    margin-left: 0.25rem;
    font-weight: 600;
}

/* ─── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #BF0A30;
    color: #fff;
    box-shadow: 0 4px 15px rgba(191, 10, 48, 0.3);
}

.btn-primary:hover {
    background: #d41040;
    box-shadow: 0 6px 25px rgba(191, 10, 48, 0.4);
    color: #fff;
}

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

.btn-outline:hover {
    background: var(--primary);
    color: #ffffff;
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-arrow {
    transition: var(--transition);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ─── Flash Messages ────────────────────────── */
.flash-container {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    z-index: 1001;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    animation: slideIn 0.4s ease;
    backdrop-filter: blur(20px);
}

.flash-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--success);
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

.flash-icon {
    font-size: 1.2rem;
}

.flash-text {
    flex: 1;
    font-size: 0.9rem;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ─── Main Content ──────────────────────────── */
.main-content {
    padding-top: 70px;
    min-height: calc(100vh - 300px);
}

/* ─── Hero ──────────────────────────────────── */
.hero {
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(135deg, #002868 0%, #001a44 100%);
    color: #ffffff;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #BF0A30;
    top: -200px;
    left: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #ffffff;
    bottom: -150px;
    right: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #BF0A30;
    top: 50%;
    left: 60%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: #ffffff;
}

.gradient-text {
    background: linear-gradient(135deg, #ff6b6b, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Sections ──────────────────────────────── */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ─── Steps ─────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.step-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 40, 104, 0.06);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Categories Grid ───────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.category-card {
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.category-card-link {
    color: inherit;
    display: block;
    flex: 1;
}

.category-card-link:hover {
    color: inherit;
}

.category-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.category-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.subcategory-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    justify-content: center;
}

.sub-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    white-space: nowrap;
}

a.sub-tag:hover {
    background: #eef2ff;
    color: var(--primary);
    border-color: var(--primary);
}

.sub-tag-more {
    color: var(--accent);
    font-style: italic;
    border-color: #fecaca;
    background: #fef2f2;
}

.job-subcategory-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    background: #fef2f2;
    color: var(--accent);
    font-weight: 500;
}

/* ─── Jobs Grid ─────────────────────────────── */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.job-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.job-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.job-category-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: #eef2ff;
    color: var(--primary);
    font-weight: 500;
}

.job-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.job-card-title a {
    color: var(--text-heading);
}

.job-card-title a:hover {
    color: var(--primary-light);
}

.job-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    flex: 1;
}

.job-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.job-budget {
    color: var(--success);
    font-weight: 600;
}

.job-bids {
    color: var(--text-muted);
}

.job-card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-glass);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.job-company {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── CTA Section ───────────────────────────── */
.cta-section {
    padding: 4rem 0 5rem;
}

.cta-content {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #002868, #001a44);
    border: 2px solid #BF0A30;
    color: #ffffff;
}

.cta-content h2 {
    color: #ffffff;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.8);
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Auth Pages ────────────────────────────── */
.auth-section {
    padding: 3rem 0;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 70px);
}

.auth-container {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}

.auth-card {
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-option input {
    display: none;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.role-option.selected .role-card,
.role-option input:checked+.role-card {
    border-color: var(--primary);
    background: #eef2ff;
}

.role-icon {
    font-size: 2rem;
}

.role-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.role-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Forms ─────────────────────────────────── */
.form-section {
    padding: 2rem 0 4rem;
}

.form-page-header {
    margin-bottom: 2rem;
}

.form-page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-page-header p {
    color: var(--text-muted);
}

.styled-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.file-input {
    font-size: 0.85rem;
}

/* ─── Alerts ────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.alert ul {
    padding-left: 1rem;
    list-style: disc;
}

.alert li {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}

/* ─── Dashboard ─────────────────────────────── */
.dashboard-section {
    padding: 2rem 0 4rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    color: #fff;
}

.gradient-1 {
    background: linear-gradient(135deg, #002868, #1a4a8a);
}

.gradient-2 {
    background: linear-gradient(135deg, #BF0A30, #d41040);
}

.gradient-3 {
    background: linear-gradient(135deg, #0052A5, #1a6ec0);
}

.gradient-4 {
    background: linear-gradient(135deg, #059669, #10b981);
}

.stat-icon {
    font-size: 2rem;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
}

.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.stat-card-mini span {
    color: var(--text-muted);
}

.stat-card-mini strong {
    font-size: 1.3rem;
    font-family: var(--font-heading);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.card-header h2 {
    font-size: 1.1rem;
}

/* ─── List Items ────────────────────────────── */
.list-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text);
    text-decoration: none;
}

.list-item:hover {
    background: var(--bg-glass);
    color: var(--text);
}

.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.list-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-item-info {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.bid-amount {
    font-weight: 700;
    color: var(--success);
    font-size: 0.95rem;
}

.bid-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Status Badges ─────────────────────────── */
.status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}

.status-open {
    background: #ecfdf5;
    color: var(--success);
}

.status-pending {
    background: #fffbeb;
    color: var(--warning);
}

.status-accepted {
    background: #ecfdf5;
    color: var(--success);
}

.status-in_progress {
    background: #eef2ff;
    color: var(--primary);
}

.status-completed {
    background: #eef2ff;
    color: var(--accent-2);
}

.status-rejected {
    background: #fef2f2;
    color: var(--danger);
}

.status-cancelled {
    background: #fef2f2;
    color: var(--danger);
}

.role-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 600;
}

.role-business {
    background: #eef2ff;
    color: var(--primary);
}

.role-freelancer {
    background: #fef2f2;
    color: var(--accent);
}

.status-dot {
    font-size: 0.8rem;
    font-weight: 500;
}

.status-dot.active {
    color: var(--success);
}

.status-dot.inactive {
    color: var(--danger);
}

.status-dot::before {
    content: '●';
    margin-right: 0.3rem;
}

/* ─── Filter Tabs ───────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--primary-light);
    color: var(--text);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ─── Empty States ──────────────────────────── */
.empty-state,
.empty-state-lg {
    text-align: center;
    padding: 2rem;
}

.empty-state-lg {
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state h3,
.empty-state-lg h3 {
    margin-bottom: 0.5rem;
}

.empty-state p,
.empty-state-lg p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ─── Job List Items ────────────────────────── */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.job-list-main {
    flex: 1;
}

.job-list-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.job-list-item h3 a {
    color: var(--text-heading);
    font-size: 1.1rem;
}

.job-list-item h3 a:hover {
    color: var(--primary-light);
}

.job-list-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.job-list-meta {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.job-list-actions {
    flex-shrink: 0;
    margin-left: 1.5rem;
}

/* ─── Job Detail ────────────────────────────── */
.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    color: var(--primary-light);
}

.job-detail-section,
.browse-section {
    padding: 2rem 0 4rem;
}

.job-detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
}

.job-detail-card {
    margin-bottom: 1.5rem;
}

.job-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-detail-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.job-detail-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.job-detail-description {
    line-height: 1.8;
    font-size: 0.95rem;
}

.job-detail-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.job-attachment {
    margin-top: 1.5rem;
}

/* ─── Sidebar ───────────────────────────────── */
.job-detail-sidebar {}

.sidebar-card {
    margin-bottom: 1rem;
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.client-info {
    display: flex;
    gap: 1rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.client-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.client-joined {
    margin-top: 0.25rem;
}

.job-summary-list {}

.job-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.job-summary-list li:last-child {
    border: none;
}

.job-summary-list span {
    color: var(--text-muted);
}

/* ─── Bid Cards ─────────────────────────────── */
.bids-section {
    margin-top: 2rem;
}

.bids-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.bids-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bid-card {
    padding: 1.5rem;
}

.bid-accepted {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.bid-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.bid-freelancer {
    display: flex;
    gap: 1rem;
}

.bid-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.bid-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bid-freelancer-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.bid-freelancer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bid-skills {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.skill-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #eef2ff;
    color: var(--primary);
}

.bid-pricing {
    text-align: right;
}

.bid-pricing .bid-amount {
    font-size: 1.3rem;
    display: block;
}

.bid-timeline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bid-cover-letter {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

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

.bid-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bid-submitted-card,
.bid-cta,
.bid-form-card {
    margin-top: 1.5rem;
}

.bid-form-card h2 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
}

.bid-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.bid-summary div {
    font-size: 0.9rem;
}

.bids-list-freelancer .bid-list-card {
    padding: 1.5rem;
}

/* ─── Search / Browse ───────────────────────── */
.browse-header {
    margin-bottom: 2rem;
}

.browse-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.browse-header p {
    color: var(--text-muted);
}

.search-filters {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.7rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select,
.filter-input {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-family: var(--font);
    flex: 1;
    min-width: 140px;
}

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

select option {
    background: #ffffff;
    color: var(--text);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.page-link.active,
.page-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ─── Profile ───────────────────────────────── */
.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-rating {
    margin-top: 0.5rem;
}

/* ─── Chat ──────────────────────────────────── */
.chat-section {
    padding: 1.5rem 0 2rem;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    padding: 0;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.chat-back {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.chat-header-info h3 {
    font-size: 1rem;
}

.chat-header-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.chat-msg {
    display: flex;
    gap: 0.5rem;
    max-width: 70%;
}

.chat-msg-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-other {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-msg-bubble {
    padding: 0.6rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-msg-mine .chat-msg-bubble {
    background: #002868;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg-other .chat-msg-bubble {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.chat-msg-mine .chat-msg-time {
    text-align: right;
}

.chat-input-form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.chat-input-form input {
    flex: 1;
    padding: 0.7rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
}

.chat-input-form input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.chat-send-btn {
    border-radius: 50px !important;
    padding: 0.7rem 1.5rem !important;
}

/* ─── Conversations list ────────────────────── */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
}

.conversation-item:hover {
    border-color: var(--primary-light);
}

.conversation-item.has-unread {
    border-color: var(--primary);
}

.conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conv-header h4 {
    font-size: 0.95rem;
}

.conv-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.conv-job {
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.1rem;
}

.conv-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
}

.conv-unread-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Stars ─────────────────────────────────── */
.stars {
    display: inline-flex;
    gap: 1px;
}

.star {
    color: #374151;
    font-size: 0.9rem;
}

.star.filled {
    color: #f59e0b;
}

.star.half {
    background: linear-gradient(90deg, #f59e0b 50%, #374151 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Admin ─────────────────────────────────── */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-search {
    display: flex;
    gap: 0.5rem;
}

.admin-search input {
    padding: 0.4rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
}

.admin-table-wrapper {
    overflow-x: auto;
    padding: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.admin-table tr:hover td {
    background: #f8f9fa;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Footer ────────────────────────────────── */
.footer {
    background: #002868;
    border-top: 3px solid #BF0A30;
    padding: 4rem 0 0;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #002868;
        flex-direction: column;
        padding: 2rem;
        gap: 0.5rem;
        transform: translateX(100%);
        transition: var(--transition);
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-num {
        font-size: 1.5rem;
    }

    .steps-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .job-detail-layout {
        grid-template-columns: 1fr;
    }

    .job-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-list-actions {
        margin-left: 0;
        margin-top: 1rem;
    }

    .bid-header {
        flex-direction: column;
    }

    .bid-pricing {
        text-align: left;
    }

    .bid-summary {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid-3 {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
    }

    .chat-msg {
        max-width: 85%;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}