/* ============================================================
   NSG Design System — NetSuiteGuide
   A clean, professional marketplace for NetSuite consultants
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Brand Colors */
    --nsg-primary:        #1B3A57;
    --nsg-primary-light:  #2A5580;
    --nsg-primary-dark:   #0F2440;
    --nsg-primary-rgb:    27, 58, 87;
    --nsg-secondary:      #3E7C98;
    --nsg-secondary-light:#5A9BB8;
    --nsg-secondary-dark: #2D5F75;
    --nsg-accent:         #F5A623;
    --nsg-accent-light:   #FFF8EB;
    --nsg-accent-dark:    #D4891A;

    /* Semantic Colors */
    --nsg-success:        #10B981;
    --nsg-success-light:  #ECFDF5;
    --nsg-warning:        #F59E0B;
    --nsg-warning-light:  #FFFBEB;
    --nsg-danger:         #EF4444;
    --nsg-danger-light:   #FEF2F2;
    --nsg-info:           #3B82F6;
    --nsg-info-light:     #EFF6FF;

    /* Neutrals */
    --nsg-bg:             #F7F8FA;
    --nsg-surface:        #FFFFFF;
    --nsg-border:         #E5E7EB;
    --nsg-border-light:   #F3F4F6;
    --nsg-text:           #1F2937;
    --nsg-text-secondary: #6B7280;
    --nsg-text-tertiary:  #9CA3AF;
    --nsg-text-inverse:   #FFFFFF;

    /* Typography */
    --nsg-font-family:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nsg-font-size-xs:   0.75rem;
    --nsg-font-size-sm:   0.875rem;
    --nsg-font-size-base: 1rem;
    --nsg-font-size-lg:   1.125rem;
    --nsg-font-size-xl:   1.25rem;
    --nsg-font-size-2xl:  1.5rem;
    --nsg-font-size-3xl:  1.875rem;
    --nsg-font-size-4xl:  2.25rem;
    --nsg-font-size-5xl:  3rem;

    /* Spacing */
    --nsg-space-1:  0.25rem;
    --nsg-space-2:  0.5rem;
    --nsg-space-3:  0.75rem;
    --nsg-space-4:  1rem;
    --nsg-space-5:  1.25rem;
    --nsg-space-6:  1.5rem;
    --nsg-space-8:  2rem;
    --nsg-space-10: 2.5rem;
    --nsg-space-12: 3rem;
    --nsg-space-16: 4rem;
    --nsg-space-20: 5rem;
    --nsg-space-24: 6rem;

    /* Border Radius */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs:   0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --shadow-xl:   0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
    --shadow-2xl:  0 25px 50px -12px rgba(0,0,0,0.15);
    --shadow-primary: 0 4px 14px rgba(var(--nsg-primary-rgb), 0.25);
    --shadow-accent:  0 4px 14px rgba(245, 166, 35, 0.25);

    /* Transitions */
    --transition-fast:   all 0.15s ease;
    --transition-base:   all 0.2s ease;
    --transition-slow:   all 0.3s ease;
    --transition-spring: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base Reset & Typography --- */
body {
    font-family: var(--nsg-font-family);
    color: var(--nsg-text);
    background-color: var(--nsg-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--nsg-text);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

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

a:hover {
    color: var(--nsg-primary-light);
}

/* --- Page Fade-In Animation --- */
@keyframes nsgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes nsgSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes nsgPulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes nsgShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes nsgSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes nsgBounceIn {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

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

.nsg-animate-in {
    animation: nsgFadeIn 0.4s ease forwards;
}

.nsg-animate-slide-up {
    animation: nsgSlideUp 0.5s ease forwards;
}

/* ============================================================
   COMPONENT: Cards
   ============================================================ */
.nsg-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    overflow: hidden;
}

.nsg-card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.nsg-card-body {
    padding: var(--nsg-space-6);
}

.nsg-card-accent {
    border-left: 4px solid var(--nsg-primary);
}

.nsg-card-accent-accent {
    border-left: 4px solid var(--nsg-accent);
}

/* ============================================================
   COMPONENT: Buttons
   ============================================================ */
.nsg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--nsg-font-family);
    font-size: var(--nsg-font-size-sm);
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.nsg-btn:active {
    transform: scale(0.98);
}

.nsg-btn:disabled,
.nsg-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Primary — Navy */
.nsg-btn-primary {
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-primary);
}
.nsg-btn-primary:hover {
    background: var(--nsg-primary-light);
    border-color: var(--nsg-primary-light);
    color: var(--nsg-text-inverse);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

/* Secondary — Teal */
.nsg-btn-secondary {
    background: var(--nsg-secondary);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-secondary);
}
.nsg-btn-secondary:hover {
    background: var(--nsg-secondary-light);
    border-color: var(--nsg-secondary-light);
    color: var(--nsg-text-inverse);
    transform: translateY(-1px);
}

/* Accent — Gold */
.nsg-btn-accent {
    background: var(--nsg-accent);
    color: var(--nsg-primary-dark);
    border-color: var(--nsg-accent);
}
.nsg-btn-accent:hover {
    background: var(--nsg-accent-dark);
    border-color: var(--nsg-accent-dark);
    color: var(--nsg-primary-dark);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

/* Outline */
.nsg-btn-outline {
    background: transparent;
    color: var(--nsg-primary);
    border-color: var(--nsg-border);
}
.nsg-btn-outline:hover {
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-primary);
}

/* Outline Light (for dark backgrounds) */
.nsg-btn-outline-light {
    background: transparent;
    color: var(--nsg-text-inverse);
    border-color: rgba(255,255,255,0.3);
}
.nsg-btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    color: var(--nsg-text-inverse);
    border-color: rgba(255,255,255,0.5);
}

/* Ghost */
.nsg-btn-ghost {
    background: transparent;
    color: var(--nsg-text-secondary);
    border-color: transparent;
}
.nsg-btn-ghost:hover {
    background: var(--nsg-bg);
    color: var(--nsg-text);
}

/* Danger */
.nsg-btn-danger {
    background: var(--nsg-danger);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-danger);
}
.nsg-btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: var(--nsg-text-inverse);
}

/* Success */
.nsg-btn-success {
    background: var(--nsg-success);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-success);
}
.nsg-btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: var(--nsg-text-inverse);
}

/* Button Sizes */
.nsg-btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: var(--nsg-font-size-xs);
    border-radius: var(--radius-sm);
}

.nsg-btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--nsg-font-size-base);
    border-radius: var(--radius-md);
}

.nsg-btn-xl {
    padding: 1rem 2rem;
    font-size: var(--nsg-font-size-lg);
    border-radius: var(--radius-md);
}

.nsg-btn-block {
    display: flex;
    width: 100%;
}

.nsg-btn-pill {
    border-radius: var(--radius-full);
}

/* ============================================================
   COMPONENT: Badges
   ============================================================ */
.nsg-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: var(--nsg-font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.5;
    white-space: nowrap;
}

.nsg-badge-primary {
    background: rgba(var(--nsg-primary-rgb), 0.1);
    color: var(--nsg-primary);
}

.nsg-badge-secondary {
    background: rgba(62, 124, 152, 0.1);
    color: var(--nsg-secondary-dark);
}

.nsg-badge-accent {
    background: var(--nsg-accent-light);
    color: var(--nsg-accent-dark);
}

.nsg-badge-success {
    background: var(--nsg-success-light);
    color: #065F46;
}

.nsg-badge-warning {
    background: var(--nsg-warning-light);
    color: #92400E;
}

.nsg-badge-danger {
    background: var(--nsg-danger-light);
    color: #991B1B;
}

.nsg-badge-info {
    background: var(--nsg-info-light);
    color: #1E40AF;
}

.nsg-badge-neutral {
    background: var(--nsg-bg);
    color: var(--nsg-text-secondary);
}

/* ============================================================
   COMPONENT: Form Controls
   ============================================================ */
.nsg-input,
.nsg-select,
.nsg-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--nsg-font-family);
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text);
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.nsg-input:focus,
.nsg-select:focus,
.nsg-textarea:focus {
    border-color: var(--nsg-primary);
    box-shadow: 0 0 0 3px rgba(var(--nsg-primary-rgb), 0.12);
}

.nsg-input::placeholder,
.nsg-textarea::placeholder {
    color: var(--nsg-text-tertiary);
}

.nsg-input-lg,
.nsg-select-lg,
.nsg-textarea-lg {
    padding: 0.875rem 1rem;
    font-size: var(--nsg-font-size-base);
    border-radius: var(--radius-md);
}

.nsg-input-group {
    display: flex;
    align-items: stretch;
}

.nsg-input-group .nsg-input,
.nsg-input-group .nsg-select {
    border-radius: 0;
}

.nsg-input-group .nsg-input:first-child,
.nsg-input-group .nsg-select:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.nsg-input-group .nsg-input:last-child,
.nsg-input-group .nsg-select:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nsg-input-group-text {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text-secondary);
    background: var(--nsg-bg);
    border: 1px solid var(--nsg-border);
    white-space: nowrap;
}

.nsg-input-group-text:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: 0;
}

.nsg-input-group-text:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-left: 0;
}

.nsg-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: var(--nsg-font-size-sm);
    font-weight: 600;
    color: var(--nsg-text);
}

.nsg-label-muted {
    color: var(--nsg-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: var(--nsg-font-size-xs);
}

/* Form Section */
.nsg-form-section {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-8);
    margin-bottom: var(--nsg-space-6);
    border-left: 4px solid var(--nsg-primary);
}

.nsg-form-section-title {
    font-size: var(--nsg-font-size-lg);
    font-weight: 700;
    color: var(--nsg-text);
    margin-bottom: var(--nsg-space-6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   COMPONENT: Skill Tags
   ============================================================ */
.nsg-skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    background: rgba(var(--nsg-primary-rgb), 0.08);
    color: var(--nsg-primary);
    border-radius: var(--radius-full);
    font-size: var(--nsg-font-size-xs);
    font-weight: 500;
    transition: all var(--transition-fast);
    margin: 2px;
}

.nsg-skill-tag:hover {
    background: rgba(var(--nsg-primary-rgb), 0.15);
}

.nsg-skill-tag .remove {
    cursor: pointer;
    font-weight: 700;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    font-size: 1rem;
    line-height: 1;
}

.nsg-skill-tag .remove:hover {
    opacity: 1;
}

/* ============================================================
   COMPONENT: Avatars
   ============================================================ */
.nsg-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--nsg-bg);
    color: var(--nsg-text-secondary);
    flex-shrink: 0;
}

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

.nsg-avatar-sm { width: 32px; height: 32px; }
.nsg-avatar-md { width: 40px; height: 40px; }
.nsg-avatar-lg { width: 56px; height: 56px; }
.nsg-avatar-xl { width: 80px; height: 80px; }
.nsg-avatar-2xl { width: 96px; height: 96px; }
.nsg-avatar-3xl { width: 120px; height: 120px; }

.nsg-avatar-bordered {
    border: 3px solid var(--nsg-surface);
    box-shadow: var(--shadow-sm);
}

.nsg-avatar-accent {
    border: 3px solid var(--nsg-accent);
}

/* Status dot on avatar */
.nsg-avatar-status {
    position: relative;
}

.nsg-avatar-status::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--nsg-surface);
}

.nsg-avatar-status-online::after { background: var(--nsg-success); }
.nsg-avatar-status-offline::after { background: var(--nsg-text-tertiary); }
.nsg-avatar-status-busy::after { background: var(--nsg-danger); }

/* ============================================================
   COMPONENT: Rating Stars
   ============================================================ */
.nsg-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    color: var(--nsg-accent);
    font-size: var(--nsg-font-size-sm);
    letter-spacing: 1px;
}

.nsg-rating-lg {
    font-size: var(--nsg-font-size-xl);
}

.nsg-rating-sm {
    font-size: var(--nsg-font-size-xs);
}

.nsg-rating-count {
    color: var(--nsg-text-secondary);
    font-size: var(--nsg-font-size-sm);
    margin-left: 0.25rem;
}

/* ============================================================
   COMPONENT: Price / Rate Display
   ============================================================ */
.nsg-price {
    font-weight: 700;
    color: var(--nsg-success);
    font-size: var(--nsg-font-size-lg);
}

.nsg-price-sm {
    font-size: var(--nsg-font-size-sm);
}

.nsg-price-lg {
    font-size: var(--nsg-font-size-xl);
}

/* ============================================================
   COMPONENT: Status Badges (for jobs, contracts, proposals)
   ============================================================ */
.nsg-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: var(--nsg-font-size-xs);
    font-weight: 600;
}

.nsg-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.nsg-status-open       { background: var(--nsg-success-light); color: #065F46; }
.nsg-status-open::before       { background: var(--nsg-success); }
.nsg-status-active     { background: var(--nsg-success-light); color: #065F46; }
.nsg-status-active::before     { background: var(--nsg-success); }
.nsg-status-completed  { background: var(--nsg-info-light); color: #1E40AF; }
.nsg-status-completed::before  { background: var(--nsg-info); }
.nsg-status-pending    { background: var(--nsg-warning-light); color: #92400E; }
.nsg-status-pending::before    { background: var(--nsg-warning); }
.nsg-status-submitted  { background: var(--nsg-info-light); color: #1E40AF; }
.nsg-status-submitted::before  { background: var(--nsg-info); }
.nsg-status-shortlisted{ background: var(--nsg-accent-light); color: var(--nsg-accent-dark); }
.nsg-status-shortlisted::before{ background: var(--nsg-accent); }
.nsg-status-accepted   { background: var(--nsg-success-light); color: #065F46; }
.nsg-status-accepted::before   { background: var(--nsg-success); }
.nsg-status-rejected   { background: var(--nsg-danger-light); color: #991B1B; }
.nsg-status-rejected::before   { background: var(--nsg-danger); }
.nsg-status-cancelled  { background: var(--nsg-danger-light); color: #991B1B; }
.nsg-status-cancelled::before  { background: var(--nsg-danger); }
.nsg-status-disputed   { background: var(--nsg-warning-light); color: #92400E; }
.nsg-status-disputed::before   { background: var(--nsg-warning); }
.nsg-status-draft      { background: var(--nsg-bg); color: var(--nsg-text-secondary); }
.nsg-status-draft::before      { background: var(--nsg-text-tertiary); }
.nsg-status-in-progress{ background: var(--nsg-accent-light); color: var(--nsg-accent-dark); }
.nsg-status-in-progress::before{ background: var(--nsg-accent); }
.nsg-status-withdrawn { background: var(--nsg-bg); color: var(--nsg-text-secondary); }
.nsg-status-withdrawn::before { background: var(--nsg-text-tertiary); }

/* ============================================================
   COMPONENT: Section Headers
   ============================================================ */
.nsg-section-header {
    text-align: center;
    margin-bottom: var(--nsg-space-12);
}

.nsg-section-label {
    display: inline-block;
    font-size: var(--nsg-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--nsg-primary);
    margin-bottom: 0.5rem;
}

.nsg-section-title {
    font-size: var(--nsg-font-size-4xl);
    font-weight: 800;
    color: var(--nsg-text);
    margin-bottom: 0.75rem;
}

.nsg-section-subtitle {
    font-size: var(--nsg-font-size-lg);
    color: var(--nsg-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   COMPONENT: Page Header
   ============================================================ */
.nsg-page-header {
    margin-bottom: var(--nsg-space-8);
}

.nsg-page-header .breadcrumb {
    margin-bottom: var(--nsg-space-4);
    font-size: var(--nsg-font-size-sm);
}

.nsg-page-header .breadcrumb-item a {
    color: var(--nsg-text-secondary);
}

.nsg-page-header .breadcrumb-item.active {
    color: var(--nsg-text);
    font-weight: 500;
}

.nsg-page-title {
    font-size: var(--nsg-font-size-3xl);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.nsg-page-subtitle {
    font-size: var(--nsg-font-size-base);
    color: var(--nsg-text-secondary);
    margin-bottom: 0;
}

/* ============================================================
   COMPONENT: Filter Sidebar
   ============================================================ */
.nsg-filter-sidebar {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    position: sticky;
    top: 80px;
}

.nsg-filter-sidebar h5 {
    font-size: var(--nsg-font-size-base);
    font-weight: 700;
    margin-bottom: var(--nsg-space-5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nsg-filter-group {
    margin-bottom: var(--nsg-space-5);
}

.nsg-filter-group label {
    display: block;
    font-size: var(--nsg-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nsg-text-secondary);
    margin-bottom: 0.5rem;
}

/* ============================================================
   COMPONENT: Tab Navigation
   ============================================================ */
.nsg-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--nsg-border);
    margin-bottom: var(--nsg-space-6);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nsg-tabs::-webkit-scrollbar {
    display: none;
}

.nsg-tab {
    padding: 0.75rem 1.25rem;
    font-size: var(--nsg-font-size-sm);
    font-weight: 600;
    color: var(--nsg-text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
}

.nsg-tab:hover {
    color: var(--nsg-primary);
}

.nsg-tab.active {
    color: var(--nsg-primary);
    border-bottom-color: var(--nsg-primary);
}

.nsg-tab .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--nsg-bg);
    color: var(--nsg-text-secondary);
    border-radius: var(--radius-full);
    margin-left: 0.375rem;
}

.nsg-tab.active .count {
    background: rgba(var(--nsg-primary-rgb), 0.1);
    color: var(--nsg-primary);
}

/* ============================================================
   COMPONENT: Stat Cards (Dashboard)
   ============================================================ */
.nsg-stat-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    transition: all var(--transition-base);
}

.nsg-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nsg-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nsg-stat-icon-primary { background: rgba(var(--nsg-primary-rgb), 0.1); color: var(--nsg-primary); }
.nsg-stat-icon-secondary { background: rgba(62, 124, 152, 0.1); color: var(--nsg-secondary); }
.nsg-stat-icon-success { background: var(--nsg-success-light); color: var(--nsg-success); }
.nsg-stat-icon-warning { background: var(--nsg-warning-light); color: var(--nsg-warning); }
.nsg-stat-icon-danger { background: var(--nsg-danger-light); color: var(--nsg-danger); }
.nsg-stat-icon-accent { background: var(--nsg-accent-light); color: var(--nsg-accent-dark); }

.nsg-stat-value {
    font-size: var(--nsg-font-size-3xl);
    font-weight: 800;
    color: var(--nsg-text);
    line-height: 1;
}

.nsg-stat-label {
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text-secondary);
    font-weight: 500;
}

/* ============================================================
   COMPONENT: Empty States
   ============================================================ */
.nsg-empty-state {
    text-align: center;
    padding: var(--nsg-space-16) var(--nsg-space-8);
}

.nsg-empty-state-icon {
    font-size: 3.5rem;
    color: var(--nsg-text-tertiary);
    margin-bottom: var(--nsg-space-6);
    opacity: 0.6;
}

.nsg-empty-state-title {
    font-size: var(--nsg-font-size-xl);
    font-weight: 700;
    color: var(--nsg-text);
    margin-bottom: 0.5rem;
}

.nsg-empty-state-text {
    font-size: var(--nsg-font-size-base);
    color: var(--nsg-text-secondary);
    max-width: 400px;
    margin: 0 auto var(--nsg-space-6);
}

/* ============================================================
   COMPONENT: Skeleton Loaders
   ============================================================ */
.nsg-skeleton {
    background: linear-gradient(90deg, var(--nsg-border-light) 25%, #E5E7EB 50%, var(--nsg-border-light) 75%);
    background-size: 200% 100%;
    animation: nsgShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.nsg-skeleton-text {
    height: 14px;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.nsg-skeleton-text:last-child {
    width: 70%;
}

.nsg-skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 0.75rem;
}

.nsg-skeleton-circle {
    border-radius: var(--radius-full);
}

.nsg-skeleton-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
}

/* ============================================================
   COMPONENT: Message Bubbles
   ============================================================ */
.nsg-message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 0.375rem;
    word-wrap: break-word;
    font-size: var(--nsg-font-size-sm);
    line-height: 1.5;
}

.nsg-message-sent {
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
}

.nsg-message-received {
    background: var(--nsg-bg);
    color: var(--nsg-text);
    margin-right: auto;
    border-bottom-left-radius: var(--radius-sm);
}

.nsg-message-time {
    font-size: 0.7rem;
    color: var(--nsg-text-tertiary);
    margin-top: 0.125rem;
}

/* ============================================================
   COMPONENT: Milestone Timeline
   ============================================================ */
.nsg-milestone {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-md);
    padding: var(--nsg-space-5);
    margin-bottom: var(--nsg-space-4);
    transition: all var(--transition-fast);
}

.nsg-milestone:hover {
    box-shadow: var(--shadow-sm);
}

.nsg-milestone-title {
    font-weight: 700;
    font-size: var(--nsg-font-size-base);
    margin-bottom: 0.25rem;
}

.nsg-milestone-desc {
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text-secondary);
    margin-bottom: 0.5rem;
}

/* ============================================================
   COMPONENT: Progress Bar
   ============================================================ */
.nsg-progress {
    height: 8px;
    background: var(--nsg-border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.nsg-progress-bar {
    height: 100%;
    background: var(--nsg-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.nsg-progress-bar-success {
    background: var(--nsg-success);
}

.nsg-progress-bar-accent {
    background: var(--nsg-accent);
}

/* ============================================================
   COMPONENT: Meta (icon + text pairs)
   ============================================================ */
.nsg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--nsg-space-4);
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text-secondary);
}

.nsg-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.nsg-meta-item i {
    color: var(--nsg-text-tertiary);
    font-size: 0.85em;
}

/* ============================================================
   COMPONENT: Divider
   ============================================================ */
.nsg-divider {
    border: none;
    height: 1px;
    background: var(--nsg-border);
    margin: var(--nsg-space-6) 0;
}

.nsg-divider-light {
    background: var(--nsg-border-light);
}

/* ============================================================
   COMPONENT: Scroll to Top
   ============================================================ */
.nsg-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: 1000;
}

.nsg-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nsg-scroll-top:hover {
    background: var(--nsg-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ============================================================
   COMPONENT: Verified Badge
   ============================================================ */
.nsg-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nsg-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.nsg-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--nsg-accent-light);
    color: var(--nsg-accent-dark);
    border-radius: var(--radius-full);
    font-size: var(--nsg-font-size-xs);
    font-weight: 600;
}

/* ============================================================
   COMPONENT: Quick Action Cards
   ============================================================ */
.nsg-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--nsg-space-6);
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-base);
    gap: 0.5rem;
}

.nsg-quick-action:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.nsg-quick-action i {
    font-size: 1.75rem;
}

.nsg-quick-action span {
    font-size: var(--nsg-font-size-sm);
    font-weight: 600;
}

/* ============================================================
   COMPONENT: Proposal Card
   ============================================================ */
.nsg-proposal-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    margin-bottom: var(--nsg-space-4);
    transition: all var(--transition-base);
}

.nsg-proposal-card:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================================
   COMPONENT: Contract Card
   ============================================================ */
.nsg-contract-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    margin-bottom: var(--nsg-space-4);
    transition: all var(--transition-base);
}

.nsg-contract-card:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================================
   COMPONENT: Job Card (listing)
   ============================================================ */
.nsg-job-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-left: 4px solid var(--nsg-primary);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    margin-bottom: var(--nsg-space-4);
    transition: all var(--transition-base);
}

.nsg-job-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--nsg-secondary);
}

/* ============================================================
   COMPONENT: Consultant Card (listing)
   ============================================================ */
.nsg-consultant-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
}

.nsg-consultant-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* ============================================================
   COMPONENT: Custom Spinner
   ============================================================ */
.nsg-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--nsg-border);
    border-top-color: var(--nsg-primary);
    border-radius: var(--radius-full);
    animation: nsgSpin 0.7s linear infinite;
}

.nsg-spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.nsg-spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

/* ============================================================
   COMPONENT: Step Indicator (Wizard)
   ============================================================ */
.nsg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--nsg-space-8);
}

.nsg-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--nsg-border);
    color: var(--nsg-text-secondary);
    font-weight: 700;
    font-size: var(--nsg-font-size-sm);
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

.nsg-step.active {
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    box-shadow: var(--shadow-primary);
}

.nsg-step.completed {
    background: var(--nsg-success);
    color: var(--nsg-text-inverse);
}

.nsg-step-line {
    width: 60px;
    height: 2px;
    background: var(--nsg-border);
    transition: background var(--transition-base);
}

.nsg-step-line.completed {
    background: var(--nsg-success);
}

/* ============================================================
   COMPONENT: User Type Selection Cards
   ============================================================ */
.nsg-type-card {
    cursor: pointer;
    border: 2px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-8);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    background: var(--nsg-surface);
}

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

.nsg-type-card.selected {
    border-color: var(--nsg-primary);
    background: rgba(var(--nsg-primary-rgb), 0.03);
    box-shadow: var(--shadow-primary);
}

.nsg-type-card .check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--nsg-primary);
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-spring);
}

.nsg-type-card.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================
   COMPONENT: Conversation Item (Messages)
   ============================================================ */
.nsg-conversation-item {
    display: flex;
    align-items: center;
    gap: var(--nsg-space-3);
    padding: var(--nsg-space-4) var(--nsg-space-5);
    border-bottom: 1px solid var(--nsg-border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.nsg-conversation-item:hover {
    background: var(--nsg-bg);
}

.nsg-conversation-item.active {
    background: rgba(var(--nsg-primary-rgb), 0.05);
    border-left: 3px solid var(--nsg-primary);
}

/* ============================================================
   COMPONENT: Summary Card (Payments)
   ============================================================ */
.nsg-summary-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-lg);
    padding: var(--nsg-space-6);
    text-align: center;
    transition: all var(--transition-base);
}

.nsg-summary-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.nsg-summary-amount {
    font-size: var(--nsg-font-size-3xl);
    font-weight: 800;
    color: var(--nsg-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.nsg-summary-label {
    font-size: var(--nsg-font-size-sm);
    color: var(--nsg-text-secondary);
    font-weight: 500;
}

/* ============================================================
   COMPONENT: Table Override
   ============================================================ */
.nsg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.nsg-table thead th {
    background: var(--nsg-bg);
    font-size: var(--nsg-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nsg-text-secondary);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--nsg-border);
}

.nsg-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--nsg-border-light);
    font-size: var(--nsg-font-size-sm);
    vertical-align: middle;
}

.nsg-table tbody tr:hover {
    background: var(--nsg-bg);
}

.nsg-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   COMPONENT: Pagination
   ============================================================ */
.nsg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: var(--nsg-space-8);
}

.nsg-pagination .page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-md);
    background: var(--nsg-surface);
    color: var(--nsg-text);
    font-size: var(--nsg-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nsg-pagination .page-btn:hover {
    background: var(--nsg-bg);
    border-color: var(--nsg-primary);
    color: var(--nsg-primary);
}

.nsg-pagination .page-btn.active {
    background: var(--nsg-primary);
    color: var(--nsg-text-inverse);
    border-color: var(--nsg-primary);
}

.nsg-pagination .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   COMPONENT: Review Card
   ============================================================ */
.nsg-review-card {
    background: var(--nsg-surface);
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-md);
    padding: var(--nsg-space-5);
    margin-bottom: var(--nsg-space-4);
}

/* ============================================================
   COMPONENT: Info Callout
   ============================================================ */
.nsg-callout {
    padding: var(--nsg-space-4) var(--nsg-space-5);
    border-radius: var(--radius-md);
    font-size: var(--nsg-font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.nsg-callout-info {
    background: var(--nsg-info-light);
    color: #1E40AF;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.nsg-callout-warning {
    background: var(--nsg-warning-light);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.nsg-callout-success {
    background: var(--nsg-success-light);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.nsg-callout-danger {
    background: var(--nsg-danger-light);
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================================
   COMPONENT: Modal Enhancements
   ============================================================ */
.nsg-modal .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.nsg-modal .modal-header {
    border-bottom: 1px solid var(--nsg-border);
    padding: var(--nsg-space-5) var(--nsg-space-6);
}

.nsg-modal .modal-body {
    padding: var(--nsg-space-6);
}

.nsg-modal .modal-footer {
    border-top: 1px solid var(--nsg-border);
    padding: var(--nsg-space-4) var(--nsg-space-6);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.nsg-bg-primary    { background-color: var(--nsg-primary) !important; }
.nsg-bg-secondary  { background-color: var(--nsg-secondary) !important; }
.nsg-bg-accent     { background-color: var(--nsg-accent) !important; }
.nsg-bg-light      { background-color: var(--nsg-bg) !important; }
.nsg-bg-surface    { background-color: var(--nsg-surface) !important; }

.nsg-text-primary   { color: var(--nsg-primary) !important; }
.nsg-text-secondary { color: var(--nsg-text-secondary) !important; }
.nsg-text-accent    { color: var(--nsg-accent) !important; }
.nsg-text-success   { color: var(--nsg-success) !important; }
.nsg-text-danger    { color: var(--nsg-danger) !important; }
.nsg-text-warning   { color: var(--nsg-warning) !important; }

.nsg-border-primary { border-color: var(--nsg-primary) !important; }
.nsg-border-accent  { border-color: var(--nsg-accent) !important; }

.nsg-rounded-sm  { border-radius: var(--radius-sm) !important; }
.nsg-rounded-md  { border-radius: var(--radius-md) !important; }
.nsg-rounded-lg  { border-radius: var(--radius-lg) !important; }
.nsg-rounded-xl  { border-radius: var(--radius-xl) !important; }
.nsg-rounded-full{ border-radius: var(--radius-full) !important; }

.nsg-shadow-sm { box-shadow: var(--shadow-sm) !important; }
.nsg-shadow-md { box-shadow: var(--shadow-md) !important; }
.nsg-shadow-lg { box-shadow: var(--shadow-lg) !important; }

.nsg-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nsg-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nsg-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 991.98px) {
    .nsg-section-title {
        font-size: var(--nsg-font-size-3xl);
    }

    .nsg-filter-sidebar {
        position: static;
        margin-bottom: var(--nsg-space-6);
    }

    .nsg-page-title {
        font-size: var(--nsg-font-size-2xl);
    }
}

@media (max-width: 767.98px) {
    .nsg-section-title {
        font-size: var(--nsg-font-size-2xl);
    }

    .nsg-stat-value {
        font-size: var(--nsg-font-size-2xl);
    }

    .nsg-message-bubble {
        max-width: 85%;
    }

    .nsg-scroll-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }
}

/* ============================================================
   BOOTSTRAP OVERRIDES (within NSG pages)
   ============================================================ */
.nsg-page .form-control,
.nsg-page .form-select {
    border: 1px solid var(--nsg-border);
    border-radius: var(--radius-md);
    font-size: var(--nsg-font-size-sm);
    padding: 0.625rem 0.875rem;
    transition: all var(--transition-fast);
}

.nsg-page .form-control:focus,
.nsg-page .form-select:focus {
    border-color: var(--nsg-primary);
    box-shadow: 0 0 0 3px rgba(var(--nsg-primary-rgb), 0.12);
}

.nsg-page .form-check-input:checked {
    background-color: var(--nsg-primary);
    border-color: var(--nsg-primary);
}

.nsg-page .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--nsg-primary-rgb), 0.12);
    border-color: var(--nsg-primary);
}

/* Override Bootstrap .bg-primary for NSG pages */
.nsg-page .bg-primary {
    background-color: var(--nsg-primary) !important;
}

.nsg-page .text-primary {
    color: var(--nsg-primary) !important;
}

.nsg-page .btn-primary {
    background-color: var(--nsg-primary);
    border-color: var(--nsg-primary);
}

.nsg-page .btn-primary:hover {
    background-color: var(--nsg-primary-light);
    border-color: var(--nsg-primary-light);
}

.nsg-page .btn-outline-primary {
    color: var(--nsg-primary);
    border-color: var(--nsg-primary);
}

.nsg-page .btn-outline-primary:hover {
    background-color: var(--nsg-primary);
    border-color: var(--nsg-primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(var(--nsg-primary-rgb), 0.15);
    color: var(--nsg-primary-dark);
}
