/* ============================================
   DASHBOARD CSS
   ============================================ */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #0f172a;
    --sidebar-color: rgba(255,255,255,0.7);
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: #0d6efd;
    --sidebar-active-bg: rgba(13, 110, 253, 0.15);
    --header-height: 64px;
    --primary: #0d6efd;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-user {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: var(--sidebar-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active);
}

.sidebar-nav .nav-link i {
    width: 20px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-nav .nav-link .badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
}

/* Navigation Sections */
.nav-section {
    margin-top: 0.25rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--sidebar-color);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.nav-section-header:hover {
    color: white;
}

.nav-section-header i:first-child {
    width: 20px;
    font-size: 1rem;
}

.nav-section-header .bi-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.nav-section .nav-link-sub {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem 0.5rem 3.2rem;
    color: var(--sidebar-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-section .nav-link-sub:hover {
    color: white;
    background: var(--sidebar-hover);
}

.nav-section .nav-link-sub.active {
    color: white;
    background: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active);
}

.nav-section .nav-link-sub i {
    width: 16px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-section .nav-link-sub .badge {
    margin-left: auto;
    background: var(--gray-700);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
}

.sidebar-nav .logout {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 0.75rem;
    color: var(--danger);
}

.sidebar-nav .logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    flex-shrink: 0;
}

.top-bar .sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

.top-bar h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar-right .text-muted {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.top-bar-right .user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.top-bar-right .user-dropdown:hover {
    background: var(--gray-100);
}

.top-bar-right .user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.main-content-body {
    padding: 1.5rem 2rem;
    flex: 1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

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

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.15;
    width: 50px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.stat-card.buyer .stat-number { color: var(--primary); }
.stat-card.vendor .stat-number { color: var(--success); }

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.quick-actions h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.quick-actions .action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-actions .action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-actions .action-card:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-actions .action-card i {
    font-size: 1.75rem;
    color: var(--primary);
}

.quick-actions .action-card span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Subscription Status */
.subscription-status {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--gray-200);
}

.subscription-status .subscription-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.subscription-status .pages-info {
    flex: 1;
    min-width: 200px;
}

.subscription-status .pages-info span {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.subscription-status .progress {
    height: 6px;
    margin-top: 0.25rem;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.subscription-status .progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.collapsed {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .top-bar .sidebar-toggle {
        display: block;
    }
    .top-bar h2 {
        font-size: 1.2rem;
    }
    .top-bar-right .text-muted {
        display: none;
    }
    .main-content-body {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-card .stat-number {
        font-size: 1.3rem;
    }
    .quick-actions .action-grid {
        grid-template-columns: 1fr 1fr;
    }
    .subscription-status .subscription-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions .action-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        flex-wrap: wrap;
        padding: 0.8rem 1rem;
    }
    .top-bar-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   NOTIFICATIONS (TOASTS)
   ============================================ */
.app-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(380px, calc(100vw - 2rem));
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.app-toast.hide {
    opacity: 0;
    transform: translateX(20px);
}

.app-toast-icon {
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--primary);
    flex-shrink: 0;
}

.app-toast-body {
    flex: 1;
    min-width: 0;
}

.app-toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
    margin-bottom: 0.15rem;
}

.app-toast-msg {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.45;
    word-wrap: break-word;
}

.app-toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 0.25rem;
    transition: color 0.2s ease;
}

.app-toast-close:hover {
    color: var(--gray-700);
}

.app-toast-success { border-left-color: var(--success); }
.app-toast-success .app-toast-icon { color: var(--success); }
.app-toast-error   { border-left-color: var(--danger); }
.app-toast-error .app-toast-icon { color: var(--danger); }
.app-toast-warning { border-left-color: var(--warning); }
.app-toast-warning .app-toast-icon { color: var(--warning); }
.app-toast-info    { border-left-color: var(--primary); }
.app-toast-info .app-toast-icon { color: var(--primary); }

/* ============================================
   GLOBAL PROGRESS BAR (top of viewport)
   ============================================ */
.app-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 4000;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.app-progress.active {
    opacity: 1;
}

.app-progress .app-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), #6c5ce7, var(--primary));
    border-radius: 0 3px 3px 0;
    transition: width 0.3s ease;
}

.app-progress .app-progress-bar.indeterminate {
    width: 40%;
    animation: progress-slide 1.2s ease-in-out infinite;
}

@keyframes progress-slide {
    0%   { margin-left: -40%; }
    100% { margin-left: 100%; }
}

/* ============================================
   FULLSCREEN LOADER OVERLAY (blocking actions)
   ============================================ */
.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-overlay.show {
    opacity: 1;
    visibility: visible;
}

.app-overlay .overlay-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    min-width: 300px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.app-overlay .overlay-icon {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: overlay-spin 1.4s linear infinite;
    display: inline-block;
}

@keyframes overlay-spin {
    100% { transform: rotate(360deg); }
}

.app-overlay .overlay-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gray-900);
    margin-bottom: 0.35rem;
}

.app-overlay .overlay-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.app-overlay .overlay-progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.app-overlay .overlay-progress .overlay-progress-bar {
    height: 100%;
    width: 35%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #6c5ce7);
    animation: overlay-advance 1.6s ease-in-out infinite;
}

@keyframes overlay-advance {
    0%   { width: 12%; margin-left: 0; }
    55%  { width: 55%; }
    100% { width: 12%; margin-left: 90%; }
}

/* ============================================
   STATUS PILLS (shared by buyer & vendor portals)
   ============================================ */
.badge-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-status.draft { background: var(--gray-200); color: var(--gray-700); }
.badge-status.published { background: #dbeafe; color: #1e40af; }
.badge-status.ready { background: #dbeafe; color: #1e40af; }
.badge-status.submitted { background: #bfdbfe; color: #1e40af; }
.badge-status.under_review,
.badge-status.under-review { background: #fef3c7; color: #92400e; }
.badge-status.processing { background: #fef3c7; color: #92400e; }
.badge-status.accepted,
.badge-status.awarded { background: #a7f3d0; color: #065f46; }
.badge-status.generated { background: #a7f3d0; color: #065f46; }
.badge-status.rejected,
.badge-status.lost,
.badge-status.error { background: #fecaca; color: #991b1b; }
.badge-status.withdrawn,
.badge-status.uploaded,
.badge-status.cancelled,
.badge-status.closed { background: var(--gray-200); color: var(--gray-600); }

/* ============================================
   RFP DOCUMENT VIEW (styled document reader)
   ============================================ */
.rfp-doc {
    max-width: 1100px;
}

.rfp-doc-header {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.rfp-doc-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #6c5ce7, var(--success));
}

.rfp-doc-header h2 {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.3;
}

.rfp-doc-header .rfp-doc-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.rfp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-200);
}

.rfp-meta .rfp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.rfp-meta .rfp-meta-item i {
    color: var(--gray-400);
}

.rfp-brief {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

.rfp-brief h6 {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.rfp-brief .brief-text {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.65;
    white-space: pre-wrap;
    margin: 0;
}

.rfp-section {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.rfp-section .section-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    user-select: none;
}

.rfp-section .section-index {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #6c5ce7);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rfp-section .section-head h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--gray-900);
    flex: 1;
}

.rfp-section .section-head .section-toggle {
    color: var(--gray-400);
    transition: transform 0.25s ease;
}

.rfp-section .section-body {
    padding: 1.5rem 1.75rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.75;
}

.rfp-section .section-body p { margin: 0 0 0.85rem; }
.rfp-section .section-body p:last-child { margin-bottom: 0; }
.rfp-section .section-body ul,
.rfp-section .section-body ol { margin: 0 0 0.85rem; padding-left: 1.4rem; }
.rfp-section .section-body li { margin-bottom: 0.3rem; }
.rfp-section .section-body h1,
.rfp-section .section-body h2,
.rfp-section .section-body h3,
.rfp-section .section-body h4 { color: var(--gray-900); font-weight: 700; margin: 1.25rem 0 0.5rem; }
.rfp-section .section-body h1 { font-size: 1.2rem; }
.rfp-section .section-body h2 { font-size: 1.1rem; }
.rfp-section .section-body h3,
.rfp-section .section-body h4 { font-size: 1rem; }
.rfp-section .section-body strong { color: var(--gray-900); }

.section-edit {
    margin-top: 1rem;
}

.rfp-doc-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.75rem;
}

/* ============================================
   DOCUMENT ACTION CARD (view actions panel)
   ============================================ */
.doc-actions .action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ============================================
   SCORE PILLS & BADGES
   ============================================ */
.score-pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    line-height: 1.5;
    vertical-align: middle;
}

.score-pill.high { background: #00b894; }
.score-pill.medium { background: #fdcb6e; color: #2d3436; }
.score-pill.low { background: #e17055; }
.score-pill.ai-score { background: #6c5ce7; }
.score-pill.overall-score { background: #0984e3; }
.score-pill.section-score { background: #00b894; }

.badge-score {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
    white-space: nowrap;
}

.badge-score.high { background: #00b894; }
.badge-score.medium { background: #fdcb6e; color: #2d3436; }
.badge-score.low { background: #e17055; }

/* ============================================
   BID SCORE OVERVIEW (big stat cards)
   ============================================ */
.score-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.score-card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-300);
}

.score-card.ai::before  { background: #6c5ce7; }
.score-card.overall::before { background: #0984e3; }

.score-card .score-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.35rem;
}

.score-card .score-value {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
}

.score-card .score-value small {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-400);
}

.score-card .score-verdict {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

.score-card .score-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.score-card .score-bar .score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.score-card .score-bar .score-bar-fill.good { background: #00b894; }
.score-card .score-bar .score-bar-fill.ok   { background: #fdcb6e; }
.score-card .score-bar .score-bar-fill.poor { background: #e17055; }

/* ============================================
   BID SECTION (prominent scored sections)
   ============================================ */
.bid-section .section-head {
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.bid-section .section-head h4 {
    font-size: 1.05rem;
}

.bid-section .section-index {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
}

.bid-section .section-rating {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.bid-content {
    background: #fbfcfe;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    padding: 1.1rem 1.25rem;
}

.bid-comment {
    margin-top: 1rem;
    padding: 0.85rem 1.1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
}

.comment-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.comment-text {
    color: var(--gray-700);
    font-size: 0.92rem;
    line-height: 1.6;
}

.section-scoring {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: 10px;
}

.section-scoring .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
}

/* ============================================
   AI EVALUATION LISTS
   ============================================ */
.ai-list .list-group-item {
    border: 1px solid var(--gray-200);
    border-radius: 10px !important;
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: #ffffff;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-list.list-strengths .list-group-item { border-left: 4px solid var(--success); }
.ai-list.list-weaknesses .list-group-item { border-left: 4px solid var(--danger); }
.ai-list.list-recommendations .list-group-item { border-left: 4px solid var(--primary); }

.section-heading-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
}