/* WinBids - main.css */
:root {
    --bg-canvas: #f9fafb;
    --bg-paper: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-line: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --green: #059669;
    --yellow: #d97706;
    --red: #dc2626;
    --radius: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-canvas);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--bg-paper); border-bottom: 1px solid var(--border-line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.header-left { display: flex; align-items: center; gap: 24px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-primary); font-weight: 700; font-size: 18px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 700; }
.main-nav { display: flex; gap: 8px; }
.nav-link { text-decoration: none; color: var(--text-secondary); padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.nav-link:hover { background: var(--bg-canvas); color: var(--text-primary); }
.nav-link.active { background: #eff6ff; color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover, #1d4ed8); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-line); }
.btn-ghost:hover { background: var(--bg-canvas); color: var(--text-primary); }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: #eff6ff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* Search bar */
.search-bar { margin: 24px 0; }
.search-form { display: flex; gap: 8px; }
.search-input { flex: 1; padding: 10px 16px; border: 1px solid var(--border-line); border-radius: 8px; font-size: 15px; background: var(--bg-paper); }
.search-input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* Layout */
.bids-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.bids-sidebar { position: sticky; top: 80px; align-self: start; }
.bids-results { flex: 1; }

/* Sidebar filters */
.filter-group { margin-bottom: 20px; }
.filter-group h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.filter-select { width: 100%; padding: 8px 12px; border: 1px solid var(--border-line); border-radius: 6px; font-size: 14px; background: var(--bg-paper); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* Bid list */
.results-header { margin-bottom: 20px; }
.results-header h1 { font-size: 20px; font-weight: 600; }
.results-count { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.bid-list { display: flex; flex-direction: column; gap: 12px; }
.bid-card { background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: var(--radius); transition: box-shadow 0.15s; }
.bid-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.bid-card-link { display: block; text-decoration: none; color: inherit; padding: 16px 20px; }
.bid-card-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bid-card-main { flex: 1; min-width: 0; }
.bid-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; line-height: 1.4; }
.bid-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.bid-agency { font-weight: 500; }
.bid-state { background: var(--bg-canvas); padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.bid-due { color: var(--yellow); }
.bid-card-side { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #eff6ff; color: var(--accent); }
.badge-federal { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #fef3cd; color: #856404; }
.badge-state { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #e8f5e9; color: #2e7d32; }

/* Usage banner */
.usage-banner { padding: 12px 16px; background: #eff6ff; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.usage-banner a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Bid detail page */
.bid-detail-page { padding: 24px 0; }
.breadcrumb { margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); text-decoration: none; font-size: 14px; }
.bid-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.bid-detail-title { font-size: 24px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.bid-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.meta-item strong { color: var(--text-primary); }
.bid-header-side { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }
.badge-status { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e8f5e9; color: #2e7d32; }

.bid-section { background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.bid-section h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-line); }
.bid-summary-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border-line); }
.detail-table td:first-child { font-weight: 500; color: var(--text-secondary); width: 180px; }
.bid-description { font-size: 14px; line-height: 1.6; color: var(--text-primary); }

.bid-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Locked/Teaser section (anon users) */
.bid-locked-section { position: relative; margin-bottom: 24px; }
.locked-content { position: relative; background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: var(--radius); padding: 20px; }
.locked-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, transparent 0%, var(--bg-paper) 90%); pointer-events: none; z-index: 1; }
.locked-fields { display: flex; flex-direction: column; gap: 12px; }
.locked-field { display: flex; justify-content: space-between; align-items: center; }
.locked-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.locked-dots { color: var(--border-line); font-size: 20px; letter-spacing: 3px; }

.signup-cta { margin-bottom: 24px; }
.signup-cta-card { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border: 1px solid var(--accent); border-radius: 12px; padding: 32px; text-align: center; }
.signup-cta-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.signup-cta-card > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cta-features { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }

.anon-banner { background: #fffbeb; border: 1px solid var(--yellow); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }
.anon-banner a { color: var(--accent); text-decoration: none; font-weight: 500; }
.link-cta { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Paywall page */
.paywall-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.paywall-card { max-width: 480px; text-align: center; background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: 12px; padding: 40px; }

/* Auth pages */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: 12px; padding: 32px; }
.auth-page h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-page .auth-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.auth-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-line); border-radius: 6px; font-size: 14px; }
.auth-form .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 14px; }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.page-link { padding: 8px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; color: var(--text-secondary); border: 1px solid var(--border-line); background: var(--bg-paper); }
.page-link:hover { background: var(--bg-canvas); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-ellipsis { padding: 8px; color: var(--text-secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border-line); background: var(--bg-paper); padding: 32px 0; margin-top: 48px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 13px; color: var(--text-secondary); margin-top: 16px; }

/* Utility */
.inline-form { display: inline; }
.empty-state { text-align: center; padding: 48px 0; color: var(--text-secondary); }

/* Landing page */
.landing-hero { text-align: center; padding: 64px 0; }
.landing-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 16px; }
.landing-hero p { font-size: 18px; color: var(--text-secondary); max-width: 640px; margin: 0 auto 32px; }
.landing-cta { display: flex; gap: 12px; justify-content: center; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; padding: 32px 0; }
.feature-card { text-align: center; padding: 24px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 800px; margin: 48px auto; }
.pricing-card { background: var(--bg-paper); border: 1px solid var(--border-line); border-radius: 12px; padding: 32px; text-align: center; }
.pricing-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .price { font-size: 36px; font-weight: 800; margin: 16px 0; }
.pricing-card .price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.pricing-card ul { list-style: none; margin: 16px 0; text-align: left; }
.pricing-card li { padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border-line); }

/* Responsive */
@media (max-width: 768px) {
    .bids-layout { grid-template-columns: 1fr; }
    .bids-sidebar { position: static; }
    .landing-features { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .bid-header { flex-direction: column; }
    .main-nav { display: none; }
}