/* BizConnect Professional Design System */

:root {
    /* Deep Indigo/Navy Color Palette */
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;
    --primary-400: #94a3b8;
    --primary-300: #cbd5e1;
    --primary-200: #e2e8f0;
    --primary-100: #f1f5f9;
    --primary-50: #e8edf2;
    
    /* Accent Colors */
    --accent-blue: #4f46e5;
    --accent-indigo: #6366f1;
    --accent-purple: #7c3aed;
    --accent-teal: #14b8a6;
    
    /* Status Colors */
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    
    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--primary-700);
    background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Typography */
h1 { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--primary-900); 
    margin-bottom: 0.5rem; 
}

h2 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    color: var(--primary-900); 
    margin-bottom: 0.5rem; 
}

h3 { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--primary-800); 
    margin-bottom: 0.5rem; 
}

h4 { 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--primary-800); 
    margin-bottom: 0.5rem; 
}

h5 { 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: var(--primary-700); 
    margin-bottom: 0.5rem; 
}

p { 
    font-size: 0.875rem; 
    color: var(--primary-600); 
    margin-bottom: 0.5rem; 
}

/* Navigation */
.navbar {
    background: var(--primary-900);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.nav-link {
    color: var(--primary-300) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem !important;
    margin: 0 0.125rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--primary-900) !important;
    background: white;
}

/* Page Container */
.page-container {
    padding: 1.5rem 0;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, #f0f4f8 0%, #d8e2ec 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    transition: all 0.2s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-indigo);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-indigo));
    border-radius: 8px 0 0 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--primary-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-indigo);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--accent-blue);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Opportunity Cards */
.opportunity-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.opportunity-card:hover {
    border-color: var(--accent-indigo);
    transform: translateX(3px);
    box-shadow: var(--shadow);
}

.opportunity-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: 0.5rem;
}

.opportunity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--primary-500);
    flex-wrap: wrap;
}

.opportunity-value {
    color: var(--accent-blue);
    font-weight: 600;
}

/* Badges */
.badge-custom {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.badge-info {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-blue);
}

/* Product Cards */
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-300);
}

.product-body {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: 0.375rem;
}

.product-company {
    font-size: 0.8rem;
    color: var(--primary-500);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-top: auto;
}

/* Message Items */
.message-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.message-item:hover {
    background: var(--primary-50);
    border-color: var(--accent-indigo);
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-sender {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-900);
}

.message-role {
    font-size: 0.75rem;
    color: var(--primary-500);
}

.message-preview {
    font-size: 0.8rem;
    color: var(--primary-600);
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* AI Match Card */
.match-card {
    background: linear-gradient(135deg, var(--primary-50), white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.match-score {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: var(--accent-teal);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Filter Bar */
.filter-bar {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

/* Form Controls */
.form-control, 
.form-select {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Feed Posts */
.post-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-author {
    font-weight: 600;
    color: var(--primary-900);
    font-size: 0.9rem;
}

.post-time {
    color: var(--primary-500);
    font-size: 0.75rem;
}

.post-content {
    color: var(--primary-700);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.post-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary-500);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.post-action:hover {
    color: var(--accent-blue);
}

.post-action.liked {
    color: var(--accent-blue);
}

/* New Post Box */
.new-post-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.new-post-input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.875rem;
    resize: none;
    font-family: 'Montserrat', sans-serif;
}

/* Section Headers */
.section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title i {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--primary-900);
    color: var(--primary-400);
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.8rem;
}

footer p {
    color: white;
    margin-bottom: 0.25rem;
}

/* Dropdown Menu */
.dropdown-menu {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    color: var(--primary-700);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-50);
    color: var(--accent-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .stat-card {
        margin-bottom: 0.5rem;
    }
    
    .opportunity-meta {
        font-size: 0.75rem;
    }
    
    .filter-bar .row > div {
        margin-bottom: 0.5rem;
    }
    
    .message-item {
        flex-wrap: wrap;
    }
    
    .message-item .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-200);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Chat Interface */
.chat-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-50);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.chat-message.sent {
    flex-direction: row-reverse;
}

.chat-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.chat-message.received .chat-bubble {
    background: var(--primary-50);
    color: var(--primary-900);
}

.chat-message.sent .chat-bubble {
    background: var(--accent-blue);
    color: white;
}

/* Profile Card */
.profile-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 600;
}

/* Utilities */
.text-muted {
    color: var(--primary-500) !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.g-2 { gap: 0.5rem !important; }
.g-3 { gap: 1rem !important; }

.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }