/* ==================== COMPREHENSIVE DASHBOARD STYLES ==================== */

/* Dashboard Modal Base */
.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

/* Dashboard Overlay */
.dashboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1;
}

/* Dashboard Container */
.dashboard-container {
    position: relative;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    margin: auto;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    z-index: 2;
    animation: slideUp 0.4s ease;
}

/* Dashboard Close Button */
.dashboard-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.dashboard-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.dashboard-close i {
    color: #fff;
    font-size: 20px;
}

/* Dashboard Header */
.dashboard-header {
    padding: 48px 48px 32px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.dashboard-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 8px;
    padding: 24px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dashboard-tabs::-webkit-scrollbar {
    height: 4px;
}

.dashboard-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.dashboard-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.dashboard-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.dashboard-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Dashboard Content */
.dashboard-content {
    padding: 48px;
    max-height: calc(90vh - 400px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dashboard-content::-webkit-scrollbar {
    width: 8px;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Tab Content */
.dashboard-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dashboard-tab-content.active {
    display: block;
}

/* Stat Cards */
.dashboard-stat-card {
    padding: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

/* Info Section */
.dashboard-info-section {
    margin-top: 32px;
}

/* Feature Cards */
.dashboard-feature-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.dashboard-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Filter Bar */
.dashboard-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}

/* Jobs Grid */
.dashboard-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Job Card */
.job-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.job-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Form Styles */
.dashboard-form {
    max-width: 100%;
}

.dashboard-form-group {
    margin-bottom: 24px;
}

.dashboard-form-label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
}

.dashboard-form-input,
.dashboard-form-input:focus {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.dashboard-form-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.dashboard-form-input::placeholder {
    color: #64748b;
}

.dashboard-form-input option {
    background: #1e293b;
    color: #fff;
}

.dashboard-form-button {
    width: 100%;
    padding: 18px 32px;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.dashboard-form-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.dashboard-form-button:active {
    transform: translateY(-1px);
}

.dashboard-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.dashboard-success,
.dashboard-error {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

.dashboard-success.active,
.dashboard-error.active {
    display: flex;
}

.dashboard-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.dashboard-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Button Variants */
.btn-premium-sm {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-premium-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gradient-luxury-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gradient-luxury-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-container {
        width: 98%;
        max-height: 95vh;
    }
    
    .dashboard-header {
        padding: 32px 24px 24px;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-tabs {
        padding: 16px 24px;
    }
    
    .dashboard-content {
        padding: 32px 24px;
        max-height: calc(95vh - 350px);
    }
    
    .dashboard-jobs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        border-radius: 24px;
    }
    
    .dashboard-header {
        padding: 24px 20px 20px;
    }
    
    .dashboard-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 16px;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
    }
    
    .dashboard-tabs {
        padding: 12px 16px;
        gap: 6px;
    }
    
    .dashboard-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .dashboard-content {
        padding: 24px 16px;
    }
    
    .dashboard-close {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }
    
    .dashboard-stat-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.9rem;
    }
    
    .dashboard-form-button {
        font-size: 1rem;
        padding: 16px 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Accessibility */
.dashboard-modal:focus-visible,
.dashboard-tab:focus-visible,
.dashboard-close:focus-visible,
.dashboard-form-input:focus-visible,
.dashboard-form-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .dashboard-modal {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== RFP PANEL ENHANCEMENTS ==================== */

/* Recipient banner in dashboard header */
.dashboard-recipient {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #cbd5e1;
    padding: 10px 18px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* RFP Process Steps */
.rfp-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.rfp-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.rfp-steps strong {
    color: #fff;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.rfp-steps p {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.rfp-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

/* Role tags on job cards */
.role-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.tag-saas { background: rgba(34, 211, 238, 0.18); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.35); }
.tag-paas { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.35); }
.tag-iaas { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.35); }
.tag-data { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.tag-ai   { background: rgba(217, 70, 239, 0.18); color: #f0abfc; border: 1px solid rgba(217, 70, 239, 0.35); }

.tag-chip {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Tech Stack Matrix */
.stack-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stack-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 22px;
    transition: all 0.3s ease;
}

.stack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.18);
}

.stack-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stack-header h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stack-header i {
    font-size: 1.4rem;
}

.stack-badge {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stack-list li {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.45;
    padding-left: 16px;
    position: relative;
}

.stack-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #64748b;
}

.stack-list strong {
    color: #fff;
    font-weight: 700;
}

.stack-saas { border-color: rgba(34, 211, 238, 0.3); }
.stack-paas { border-color: rgba(59, 130, 246, 0.3); }
.stack-iaas { border-color: rgba(168, 85, 247, 0.3); }
.stack-data { border-color: rgba(16, 185, 129, 0.3); }
.stack-ai   { border-color: rgba(217, 70, 239, 0.3); }

/* RFP Form Structure */
.rfp-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    margin-bottom: 28px;
}

.rfp-intro i {
    flex-shrink: 0;
    padding-top: 4px;
}

.rfp-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rfp-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
}

.rfp-legend {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rfp-legend i {
    color: #93c5fd;
}

.rfp-hint {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Stack sections inside RFP form */
.stack-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.stack-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.stack-section-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stack-section-title i {
    font-size: 1.1rem;
}

.saas-title i { color: #22d3ee; }
.paas-title i { color: #60a5fa; }
.iaas-title i { color: #c084fc; }
.data-title i { color: #34d399; }
.ai-title   i { color: #e879f9; }

.primary-pill {
    display: inline-block;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Checkbox grid for vendor selection */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.check-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.check-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.check-chip input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #06b6d4;
    cursor: pointer;
    flex-shrink: 0;
}

.check-chip:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.18));
    border-color: rgba(6, 182, 212, 0.5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.check-chip.stand-alone {
    margin-top: 12px;
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
}

/* RFP success / submission state */
.rfp-success-panel {
    padding: 28px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.rfp-success-panel h4 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.rfp-success-panel p {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin: 0;
}

.rfp-reference {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .rfp-fieldset {
        padding: 18px;
    }

    .rfp-legend {
        font-size: 0.85rem;
    }

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

    .dashboard-recipient {
        font-size: 0.78rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Enhanced Dashboard — Analytics & AI Assistant Tabs (May 2026)
   ============================================================ */

/* --- Analytics header & controls --- */
.analytics-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.analytics-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.analytics-controls select.dashboard-form-input {
    min-width: 160px;
    padding: 0.55rem 0.9rem;
}
.btn-mini {
    padding: 0.55rem 0.9rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.6rem;
    color: rgba(229,231,235,0.9);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-mini:hover {
    background: rgba(56,189,248,0.15);
    border-color: rgba(56,189,248,0.4);
    color: #fff;
}
.btn-refresh i { transition: transform 0.5s ease; }
.btn-refresh:hover i { transform: rotate(180deg); }

/* --- KPI tiles --- */
.analytics-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.kpi-tile {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.kpi-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--kpi-color, #06b6d4);
}
.kpi-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 10px 24px -10px rgba(0,0,0,0.4);
}
.kpi-cyan    { --kpi-color: #06b6d4; }
.kpi-purple  { --kpi-color: #a855f7; }
.kpi-pink    { --kpi-color: #ec4899; }
.kpi-fuchsia { --kpi-color: #d946ef; }
.kpi-emerald { --kpi-color: #10b981; }
.kpi-amber   { --kpi-color: #f59e0b; }
.kpi-rose    { --kpi-color: #f43f5e; }
.kpi-sky     { --kpi-color: #38bdf8; }
.kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(156,163,175,0.95);
    margin-bottom: 0.4rem;
}
.kpi-value {
    font-size: 1.55rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.3rem;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
.kpi-delta {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.72rem; font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.kpi-delta.up      { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.kpi-delta.down    { background: rgba(239,68,68,0.15);  color: #fca5a5; }
.kpi-delta.neutral { background: rgba(148,163,184,0.15); color: #cbd5e1; }

/* --- Analytics grid & cards --- */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.analytics-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1.1rem;
    padding: 1.1rem 1.2rem;
    transition: all 0.3s ease;
}
.analytics-card:hover { border-color: rgba(255,255,255,0.18); }
.analytics-card-wide { grid-column: span 2; }
/* Chart.js with maintainAspectRatio:false needs a fixed-height, positioned box —
   otherwise the canvas inherits the card height and grows on every resize cycle. */
.analytics-card { display: flex; flex-direction: column; min-width: 0; }
.analytics-card canvas[data-chart] {
    display: block;
    width: 100% !important;
    height: 240px !important;
    max-height: 240px;
    flex: 0 0 auto;
}
.analytics-card-wide canvas[data-chart] { height: 280px !important; max-height: 280px; }
.analytics-status { grid-column: 1 / -1; }
.analytics-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.85rem;
}
.analytics-card-header h4 {
    font-size: 0.95rem; font-weight: 800; color: #fff;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.analytics-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.68rem; font-weight: 700;
    color: rgba(229,231,235,0.85);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.analytics-caption {
    font-size: 0.7rem; color: rgba(156,163,175,0.8);
    margin-top: 0.6rem; font-style: italic;
}

/* --- Vendor heatmap --- */
.vendor-heatmap {
    display: grid;
    grid-template-columns: 140px repeat(5, 1fr);
    gap: 4px;
    margin-top: 0.5rem;
}
.heatmap-row { display: contents; }
.heatmap-label {
    font-size: 0.78rem; font-weight: 600;
    color: rgba(229,231,235,0.9);
    padding: 0.5rem 0.6rem;
    display: flex; align-items: center;
}
.heatmap-cell {
    padding: 0.5rem 0.4rem;
    text-align: center;
    border-radius: 0.45rem;
    font-size: 0.72rem; font-weight: 700;
    color: #fff;
    font-family: ui-monospace, monospace;
}
.heatmap-cell.hot-1 { background: rgba(34,197,94,0.22);  color: #86efac; }
.heatmap-cell.hot-2 { background: rgba(132,204,22,0.32); color: #bef264; }
.heatmap-cell.hot-3 { background: rgba(234,179,8,0.40);  color: #fde047; }
.heatmap-cell.hot-4 { background: rgba(249,115,22,0.50); color: #fed7aa; }
.heatmap-cell.hot-5 { background: rgba(239,68,68,0.65);  color: #fff; }
.heatmap-axis span {
    font-size: 0.68rem;
    text-align: center;
    color: rgba(156,163,175,0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.45rem 0;
    font-weight: 700;
}

/* --- Lists inside analytics cards --- */
.analytics-list {
    display: flex; flex-direction: column; gap: 0.4rem;
}
.analytics-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.55rem;
    font-size: 0.85rem;
    color: rgba(229,231,235,0.9);
}
.metric-pill {
    background: rgba(56,189,248,0.15);
    color: #7dd3fc;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.analytics-skill-trends {
    display: flex; flex-direction: column; gap: 0.35rem;
}
.analytics-skill-trends li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 0.55rem;
    font-size: 0.85rem;
}
.analytics-skill-trends span:first-child { color: rgba(229,231,235,0.9); }
.trend-up {
    background: rgba(244,63,94,0.18);
    color: #fda4af;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: ui-monospace, monospace;
}

/* --- Portfolio mix grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.7rem;
}
.portfolio-cell {
    padding: 1rem;
    border-radius: 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
}
.portfolio-cell.portfolio-saas   { border-left: 4px solid #06b6d4; }
.portfolio-cell.portfolio-data   { border-left: 4px solid #10b981; }
.portfolio-cell.portfolio-ai     { border-left: 4px solid #f43f5e; }
.portfolio-cell.portfolio-cloud  { border-left: 4px solid #f59e0b; }
.portfolio-cell.portfolio-paas   { border-left: 4px solid #a855f7; }
.portfolio-share {
    font-size: 1.7rem; font-weight: 900; color: #fff;
    font-family: ui-monospace, monospace;
}
.portfolio-label {
    font-size: 0.85rem; font-weight: 700; color: #e5e7eb;
    margin-top: 0.25rem;
}
.portfolio-sub {
    font-size: 0.72rem; color: rgba(156,163,175,0.85);
    margin-top: 0.2rem;
}

/* ============================================================
   AI Assistant Tab
   ============================================================ */
.ai-hero {
    display: flex; gap: 1rem; align-items: center;
    padding: 1.1rem 1.3rem;
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(59,130,246,0.10));
    border: 1px solid rgba(56,189,248,0.25);
    border-radius: 1rem;
    margin-bottom: 1.4rem;
}
.ai-hero-purple {
    background: linear-gradient(135deg, rgba(168,85,247,0.14), rgba(236,72,153,0.10));
    border-color: rgba(168,85,247,0.30);
}
.ai-hero-icon {
    flex-shrink: 0;
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px -6px rgba(56,189,248,0.5);
}
.ai-hero-icon-purple {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 10px 24px -6px rgba(168,85,247,0.5);
}
.ai-hero-icon i { color: #fff; font-size: 1.55rem; }

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.ai-tool-card-wide { grid-column: span 2; }
.ai-tool-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.ai-tool-card:hover {
    border-color: rgba(168,85,247,0.35);
    transform: translateY(-2px);
}
.ai-tool-header {
    display: flex; align-items: center; gap: 0.55rem;
    margin-bottom: 0.55rem;
}
.ai-tool-header h4 {
    font-size: 1rem; font-weight: 800; color: #fff;
}
.ai-textarea {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}
.ai-tool-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-top: 0.6rem;
}
.btn-ai-primary {
    padding: 0.65rem 1.1rem;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 0.7rem;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px -6px rgba(56,189,248,0.55);
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.btn-ai-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(56,189,248,0.7);
}
.btn-ai-primary:disabled {
    opacity: 0.6; cursor: wait;
}
.btn-ai-purple {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 6px 16px -6px rgba(168,85,247,0.55);
}
.btn-ai-purple:hover {
    box-shadow: 0 10px 22px -6px rgba(168,85,247,0.7);
}
.btn-ai-secondary {
    padding: 0.65rem 1.1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.7rem;
    color: rgba(229,231,235,0.9);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-ai-secondary:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
}

.ai-output {
    margin-top: 0.85rem;
    padding: 0.9rem 1rem;
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(56,189,248,0.25);
    border-radius: 0.75rem;
    font-size: 0.82rem;
    color: rgba(229,231,235,0.92);
    line-height: 1.55;
    max-height: 500px;
    overflow-y: auto;
}
.ai-output[hidden] { display: none; }
.ai-output h5 {
    color: #7dd3fc;
    font-weight: 800;
    font-size: 0.85rem;
    margin: 0.6rem 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ai-output ul { margin: 0.3rem 0 0.6rem; padding-left: 1.2rem; }
.ai-output ul li { margin-bottom: 0.2rem; }
.ai-output .ai-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    margin: 0.1rem 0.25rem 0.1rem 0;
}
.ai-output .ai-tag-cyan    { background: rgba(6,182,212,0.18); color: #67e8f9; }
.ai-output .ai-tag-purple  { background: rgba(168,85,247,0.18); color: #d8b4fe; }
.ai-output .ai-tag-emerald { background: rgba(16,185,129,0.18); color: #6ee7b7; }
.ai-output .ai-tag-amber   { background: rgba(245,158,11,0.18); color: #fcd34d; }
.ai-output .ai-tag-rose    { background: rgba(244,63,94,0.18);  color: #fda4af; }
.ai-output .ai-meta {
    font-size: 0.7rem;
    color: rgba(156,163,175,0.7);
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255,255,255,0.10);
    font-style: italic;
}
.ai-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.78rem;
}
.ai-output table th, .ai-output table td {
    padding: 0.4rem 0.55rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}
.ai-output table th {
    color: #7dd3fc;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}
.ai-output .ai-loading {
    display: flex; align-items: center; gap: 0.5rem;
    color: rgba(229,231,235,0.7);
}
.ai-output .ai-loading::before {
    content: '';
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(56,189,248,0.3);
    border-top-color: #7dd3fc;
    animation: ai-spin 0.7s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-output .ai-banner {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(6,182,212,0.10));
    border: 1px solid rgba(16,185,129,0.30);
    border-radius: 0.55rem;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    color: #a7f3d0;
}
.ai-trust {
    display: flex; gap: 0.85rem; align-items: center;
    padding: 0.85rem 1.1rem;
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.20);
    border-radius: 0.85rem;
}
.ai-trust i { font-size: 1.2rem; }

/* ============================================================
   Enhanced RFP — AI scoring (sliders) & milestones
   ============================================================ */
.rfp-fieldset-ai {
    border-color: rgba(168,85,247,0.30) !important;
    background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(236,72,153,0.04));
}
.rfp-fieldset-help {
    font-size: 0.82rem;
    color: rgba(156,163,175,0.95);
    margin: 0 0 0.85rem;
    font-style: italic;
}

.weight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem 1.1rem;
}
.weight-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.45rem 0;
}
.weight-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(229,231,235,0.9);
}
.weight-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #a855f7 0%, #06b6d4 50%, #10b981 100%);
    outline: none;
}
.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.45);
    transition: transform 0.15s ease;
}
.weight-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.weight-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.45);
}
.weight-value {
    min-width: 44px;
    text-align: center;
    padding: 0.2rem 0.5rem;
    background: rgba(168,85,247,0.15);
    color: #d8b4fe;
    border-radius: 0.45rem;
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Milestones grid */
.milestone-grid {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.milestone-row {
    display: grid;
    grid-template-columns: 1.8fr 0.7fr 2fr 0.7fr;
    gap: 0.45rem;
}
.milestone-row .dashboard-form-input {
    font-size: 0.82rem;
    padding: 0.55rem 0.7rem;
}

/* AI-filled animation */
@keyframes ai-pulse-fill {
    0% { background-color: rgba(56,189,248,0.32); }
    100% { background-color: transparent; }
}
.ai-filled {
    animation: ai-pulse-fill 1.8s ease-out;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-card-wide { grid-column: span 1; }
    .ai-tools-grid { grid-template-columns: 1fr; }
    .ai-tool-card-wide { grid-column: span 1; }
    .vendor-heatmap { grid-template-columns: 90px repeat(5, 1fr); font-size: 0.7rem; }
    .heatmap-label { font-size: 0.7rem; padding: 0.3rem 0.4rem; }
    .heatmap-cell { padding: 0.3rem 0.2rem; font-size: 0.65rem; }
    .milestone-row { grid-template-columns: 1fr 1fr; }
    .weight-row { grid-template-columns: 1fr; gap: 0.3rem; }
    .analytics-header { flex-direction: column; align-items: stretch; }
    .analytics-controls { width: 100%; }
}

/* ============================================================
   AI Output Rendering — rich result panels (rendered from JS)
   ============================================================ */
.ai-output-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0.25rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ai-output-title i { color: #a855f7; }

.ai-output-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: #cbd5e1;
    margin: 1rem 0 0.5rem;
}

.ai-output-row {
    margin: 0.55rem 0;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
}
.ai-output-row strong { color: #fff; margin-right: 0.35rem; }

.ai-output-summary {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: rgba(168, 85, 247, 0.10);
    border-left: 3px solid #a855f7;
    border-radius: 0.4rem;
    color: #e2e8f0;
    font-size: 0.88rem;
    line-height: 1.55;
}

.ai-output-list {
    margin: 0.4rem 0 0.4rem 1.25rem;
    padding: 0;
    color: #cbd5e1;
    font-size: 0.88rem;
}
.ai-output-list li { margin: 0.3rem 0; line-height: 1.5; }

.ai-output-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 0.75rem;
    font-size: 0.83rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.4rem;
    overflow: hidden;
}
.ai-output-table th,
.ai-output-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    vertical-align: top;
}
.ai-output-table th {
    background: rgba(168, 85, 247, 0.15);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ai-output-table tbody tr:hover { background: rgba(168, 85, 247, 0.06); }

.ai-output-json {
    background: rgba(15, 23, 42, 0.7);
    color: #93c5fd;
    padding: 0.75rem;
    border-radius: 0.4rem;
    font-size: 0.78rem;
    overflow-x: auto;
    max-height: 320px;
    line-height: 1.45;
}

/* Salary / Budget tiles */
.ai-salary-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: 0.5rem 0 0.75rem;
}
.ai-salary-tile {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.5rem;
    padding: 0.7rem;
    text-align: center;
}
.ai-salary-tile span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}
.ai-salary-tile strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.ai-salary-median {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(244, 114, 182, 0.18));
    border-color: rgba(168, 85, 247, 0.4);
}
.ai-salary-median strong { color: #f472b6; }

/* Match score */
.ai-match-score {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    margin: 0.5rem 0 0.75rem;
}
.ai-match-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--score-color, #fbbf24);
    line-height: 1;
}
.ai-match-number small {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    margin-left: 0.15rem;
}
.ai-match-rec {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

/* Inclusive rewrite block */
.ai-rewrite {
    margin-top: 0.4rem;
    padding: 0.7rem 0.85rem;
    background: rgba(52, 211, 153, 0.08);
    border-left: 3px solid #34d399;
    border-radius: 0.4rem;
    color: #d1fae5;
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* Banners — source indicator */
.ai-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
    border: 1px solid transparent;
}
.ai-banner-live {
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.30);
    color: #6ee7b7;
}
.ai-banner-heuristic {
    background: rgba(251, 191, 36, 0.10);
    border-color: rgba(251, 191, 36, 0.30);
    color: #fcd34d;
}
.ai-banner-error {
    background: rgba(248, 113, 113, 0.10);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

/* Loading state */
.ai-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}
.ai-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(168, 85, 247, 0.25);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

/* Apply-to-form button */
.ai-apply-btn {
    margin-top: 0.85rem;
    display: inline-flex;
    align-items: center;
}

/* Extra tag colour variants (used by JS-rendered tag lists) */
.ai-output .ai-tag-cyan,
.ai-tag.ai-tag-cyan    { background: rgba(6, 182, 212, 0.18); color: #67e8f9; }
.ai-output .ai-tag-purple,
.ai-tag.ai-tag-purple  { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; }
.ai-output .ai-tag-pink,
.ai-tag.ai-tag-pink    { background: rgba(244, 114, 182, 0.18); color: #fbcfe8; }
.ai-output .ai-tag-emerald,
.ai-tag.ai-tag-emerald { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.ai-output .ai-tag-rose,
.ai-tag.ai-tag-rose    { background: rgba(244, 63, 94, 0.18); color: #fda4af; }

/* Refresh button spinning state */
.btn-refresh.refreshing i { animation: ai-spin 0.8s linear infinite; }

@media (max-width: 900px) {
    .ai-salary-tiles { grid-template-columns: 1fr; }
    .ai-match-score { flex-direction: column; text-align: center; }
    .ai-output-table { font-size: 0.75rem; }
    .ai-output-table th,
    .ai-output-table td { padding: 0.35rem 0.4rem; }
}

/* ============================================================
   AI Insights panel (analytics tabs)
   ============================================================ */
.ai-insights-panel {
    margin: 0 0 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(251,146,60,0.28);
    background: linear-gradient(135deg, rgba(251,146,60,0.08), rgba(56,189,248,0.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.ai-insights-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.ai-insights-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.ai-insights-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ai-insights-actions .btn-mini {
    border-color: rgba(251,146,60,0.45);
    background: rgba(251,146,60,0.12);
}
.ai-insights-actions .btn-mini:hover {
    background: rgba(251,146,60,0.25);
    border-color: rgba(251,146,60,0.7);
}
.ai-insights-body { font-size: 0.85rem; color: rgba(229,231,235,0.9); line-height: 1.55; }
.ai-insights-body .ai-output { margin-top: 0; background: rgba(0,0,0,0.25); }
.ai-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0.5rem 0;
}
.ai-insights-grid .ai-output-row { margin: 0; }

/* --- Result toolbar (copy / download) --- */
.ai-result-toolbar {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(255,255,255,0.12);
}
.ai-result-toolbar .btn-mini { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.ai-apply-btn { margin-top: 0.75rem; }

/* --- Pre-submission AI review --- */
.ai-review-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 1.25rem 0 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 0.8rem;
    border: 1px dashed rgba(56,189,248,0.4);
    background: rgba(56,189,248,0.06);
}
.ai-review-bar .btn-ai-secondary { margin: 0; white-space: nowrap; }
.ai-review-hint { font-size: 0.78rem; color: rgba(156,163,175,0.95); flex: 1 1 220px; }
.ai-review-output { margin-bottom: 1rem; }
.ai-gap {
    border-color: rgba(251,191,36,0.75) !important;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.18) !important;
}

/* --- Dimension score bars (readiness / literacy) --- */
.ai-dims { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.55rem; }
.ai-dim-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(80px, 2fr) 2.5rem;
    align-items: center;
    gap: 0.6rem;
}
.ai-dim-row strong { text-align: right; color: #fff; }
.ai-dim-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.ai-dim-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #fb923c);
    transition: width 0.6s ease;
}

@media (max-width: 768px) {
    .ai-insights-grid { grid-template-columns: 1fr; }
    .ai-review-bar { flex-direction: column; align-items: stretch; }
    .ai-review-bar .btn-ai-secondary { width: 100%; justify-content: center; }
    .ai-dim-row { grid-template-columns: 1fr 2.5rem; }
    .ai-dim-row .ai-dim-bar { grid-column: 1 / -1; }
}
