/**
 * BUZZRFP Government Theme
 *
 * This stylesheet implements the BUZZRFP design system with:
 * - Government-friendly color palette (Navy, Blue, Red, Gold)
 * - SaaS-optimized admin panel colors (softened for daily use)
 * - Modern typography with Inter font family
 * - Status badges and semantic colors
 *
 * Design Strategy:
 * - Sidebar uses darker navy (#1E3A5F) for brand connection
 * - Main content uses softer tones for comfortable daily use
 * - Semantic status colors for quick visual understanding
 */

/* ============================================
   CSS CUSTOM PROPERTIES - BUZZRFP Design System
   ============================================ */
:root {
    /* Government Theme - Primary Colors (mapped from design-tokens.css) */
    --gov-navy: #112E51;
    --gov-blue: #205493;
    --gov-blue-light: #4A9BC4;
    --gov-red: #B51D09;
    --gov-red-light: #CD2026;
    --gov-gold: #FBBF24;
    --gov-gray: #525252;
    --gov-gray-light: #a3a3a3;
    --gov-cream: #f5f5f5;

    /* Primary - Brand Blue (Softened for Daily Use) */
    --primary-50: #F0F8FC;
    --primary-100: #E1F1F9;
    --primary-200: #BCE0F1;
    --primary-300: #93CAE4;
    --primary-400: #6BB3D4;
    --primary-500: #4A9BC4;
    --primary-600: #3B82A0;
    --primary-700: #2D5F8A;
    --primary-800: #234B6E;
    --primary-900: #1E3A5F;
    --primary-950: #152A45;

    /* Accent - Warm Gold/Amber for CTAs & Highlights */
    --accent-50: #FFFBEB;
    --accent-100: #FEF3C7;
    --accent-200: #FDE68A;
    --accent-300: #FCD34D;
    --accent-400: #FBBF24;
    --accent-500: #F59E0B;
    --accent-600: #D97706;
    --accent-700: #B45309;
    --accent-800: #92400E;
    --accent-900: #78350F;

    /* Semantic - Success (Wins, Completed, Approved) */
    --success-50: #F0FDF4;
    --success-100: #DCFCE7;
    --success-200: #BBF7D0;
    --success-300: #86EFAC;
    --success-400: #4ADE80;
    --success-500: #22C55E;
    --success-600: #16A34A;
    --success-700: #15803D;
    --success-800: #166534;
    --success-900: #14532D;

    /* Semantic - Warning (Deadlines, Attention) */
    --warning-50: #FFFBEB;
    --warning-100: #FEF3C7;
    --warning-200: #FDE68A;
    --warning-300: #FCD34D;
    --warning-400: #FBBF24;
    --warning-500: #F59E0B;
    --warning-600: #D97706;
    --warning-700: #B45309;
    --warning-800: #92400E;
    --warning-900: #78350F;

    /* Semantic - Danger (Errors, Urgent, Rejected) */
    --danger-50: #FEF2F2;
    --danger-100: #FEE2E2;
    --danger-200: #FECACA;
    --danger-300: #FCA5A5;
    --danger-400: #F87171;
    --danger-500: #EF4444;
    --danger-600: #DC2626;
    --danger-700: #B91C1C;
    --danger-800: #991B1B;
    --danger-900: #7F1D1D;

    /* Semantic - Info (Information, Tips) */
    --info-50: #EFF6FF;
    --info-100: #DBEAFE;
    --info-200: #BFDBFE;
    --info-300: #93C5FD;
    --info-400: #60A5FA;
    --info-500: #3B82F6;
    --info-600: #2563EB;
    --info-700: #1D4ED8;
    --info-800: #1E40AF;
    --info-900: #1E3A8A;

    /* Neutral - Warm Gray Scale (from design-tokens.css) */
    --neutral-50:  #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    /* Proposal/RFP Status Colors */
    --status-draft: #64748B;
    --status-draft-bg: #F1F5F9;
    --status-pending: #F59E0B;
    --status-pending-bg: #FEF3C7;
    --status-submitted: #3B82F6;
    --status-submitted-bg: #DBEAFE;
    --status-evaluation: #8B5CF6;
    --status-evaluation-bg: #EDE9FE;
    --status-awarded: #22C55E;
    --status-awarded-bg: #DCFCE7;
    --status-rejected: #EF4444;
    --status-rejected-bg: #FEE2E2;
    --status-expired: #6B7280;
    --status-expired-bg: #F3F4F6;
    --status-renewal: #06B6D4;
    --status-renewal-bg: #CFFAFE;

    /* Theme Properties — mapped from design-tokens.css */
    --transition-speed: 200ms;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --border-radius-xl: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-sidebar: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--neutral-900);
    background-color: var(--neutral-100);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    color: var(--neutral-900);
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

/* Default (mobile-first: < 640px) */
h1 { font-size: 1.25rem; line-height: 1.75rem; }
h2 { font-size: 1.125rem; line-height: 1.5rem; }
h3 { font-size: 1rem; line-height: 1.375rem; }

/* Tablet (≥ 768px) */
@media (min-width: 768px) {
    h1 { font-size: 1.375rem; line-height: 1.875rem; }
    h2 { font-size: 1.25rem; line-height: 1.625rem; }
    h3 { font-size: 1.125rem; line-height: 1.5rem; }
}

/* Laptop (≥ 1024px) — compact headings, scoped to content area only */
@media (min-width: 1024px) {
    #content-wrapper h1 { font-size: 1.25rem !important; line-height: 1.625rem !important; font-weight: 600 !important; }
    #content-wrapper h2 { font-size: 1rem !important; line-height: 1.375rem !important; font-weight: 600 !important; }
    #content-wrapper h3 { font-size: 0.875rem !important; line-height: 1.25rem !important; font-weight: 600 !important; }
}

/* Large screen / external monitor (≥ 1440px) — restore full sizes */
@media (min-width: 1440px) {
    #content-wrapper h1 { font-size: 1.625rem !important; line-height: 2.125rem !important; font-weight: 600 !important; }
    #content-wrapper h2 { font-size: 1.375rem !important; line-height: 1.875rem !important; font-weight: 600 !important; }
    #content-wrapper h3 { font-size: 1.25rem !important; line-height: 1.75rem !important; font-weight: 600 !important; }
}

/* ============================================
   NAVIGATION BAR - Government Theme
   ============================================ */
.buzzrfp-nav {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
    border-bottom: 1px solid var(--primary-700);
    box-shadow: var(--shadow-md);
}

.buzzrfp-nav-light {
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   SIDEBAR - Dark Government Navy
   ============================================ */
.buzzrfp-sidebar {
    background: var(--primary-900);
    color: white;
    box-shadow: var(--shadow-sidebar);
}

.buzzrfp-sidebar .sidebar-logo {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.buzzrfp-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-easing);
    margin: 0.125rem 0.75rem;
}

.buzzrfp-sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.buzzrfp-sidebar .nav-item.active {
    background: var(--primary-600);
    color: white;
}

.buzzrfp-sidebar .nav-item .icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buzzrfp-sidebar .nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1rem 0.5rem 1.5rem;
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */
.btn-buzzrfp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-easing);
    cursor: pointer;
    gap: 0.5rem;
    border: none;
}

.btn-buzzrfp:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 160, 0.3);
}

.btn-buzzrfp-primary {
    background: var(--primary-600);
    color: white;
}

.btn-buzzrfp-primary:hover {
    background: var(--primary-700);
}

.btn-buzzrfp-secondary {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

.btn-buzzrfp-secondary:hover {
    background: var(--neutral-300);
}

.btn-buzzrfp-accent {
    background: var(--accent-400);
    color: var(--neutral-900);
}

.btn-buzzrfp-accent:hover {
    background: var(--accent-500);
}

.btn-buzzrfp-success {
    background: var(--success-600);
    color: white;
}

.btn-buzzrfp-success:hover {
    background: var(--success-700);
}

.btn-buzzrfp-danger {
    background: var(--danger-600);
    color: white;
}

.btn-buzzrfp-danger:hover {
    background: var(--danger-700);
}

.btn-buzzrfp-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
}

.btn-buzzrfp-outline:hover {
    background: var(--primary-50);
}

.btn-buzzrfp-ghost {
    background: transparent;
    color: var(--neutral-600);
}

.btn-buzzrfp-ghost:hover {
    background: var(--neutral-100);
}

.btn-buzzrfp-gov {
    background: var(--gov-red);
    color: white;
}

.btn-buzzrfp-gov:hover {
    background: var(--gov-red-light);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge-buzzrfp {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.375rem;
}

.badge-draft {
    background: var(--status-draft-bg);
    color: var(--status-draft);
}

.badge-pending {
    background: var(--status-pending-bg);
    color: var(--warning-700);
}

.badge-submitted {
    background: var(--status-submitted-bg);
    color: var(--info-700);
}

.badge-evaluation {
    background: var(--status-evaluation-bg);
    color: #7C3AED;
}

.badge-awarded {
    background: var(--status-awarded-bg);
    color: var(--success-700);
}

.badge-rejected {
    background: var(--status-rejected-bg);
    color: var(--danger-700);
}

.badge-expired {
    background: var(--status-expired-bg);
    color: var(--status-expired);
}

.badge-renewal {
    background: var(--status-renewal-bg);
    color: #0891B2;
}

/* ============================================
   CARD COMPONENTS
   ============================================ */
.card-buzzrfp {
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
    transition: all var(--transition-speed) var(--transition-easing);
}

.card-buzzrfp:hover {
    box-shadow: var(--shadow-card-hover);
}

.card-buzzrfp-header {
    padding: 1rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-buzzrfp-body {
    padding: 1rem;
}

.card-buzzrfp-footer {
    padding: 0.75rem 1rem;
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card-buzzrfp {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--neutral-200);
}

.stat-card-buzzrfp .stat-label {
    font-size: 0.75rem;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card-buzzrfp .stat-value {
    font-size: 1.385rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.stat-card-buzzrfp .stat-change-positive {
    font-size: 0.75rem;
    color: var(--success-600);
}

.stat-card-buzzrfp .stat-change-negative {
    font-size: 0.75rem;
    color: var(--danger-600);
}

/* ============================================
   ALERT COMPONENTS
   ============================================ */
.alert-buzzrfp {
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert-buzzrfp-success {
    background: var(--success-50);
    border: 1px solid var(--success-500);
    color: var(--success-700);
}

.alert-buzzrfp-warning {
    background: var(--warning-50);
    border: 1px solid var(--warning-500);
    color: var(--warning-700);
}

.alert-buzzrfp-danger {
    background: var(--danger-50);
    border: 1px solid var(--danger-500);
    color: var(--danger-700);
}

.alert-buzzrfp-info {
    background: var(--info-50);
    border: 1px solid var(--info-500);
    color: var(--info-700);
}

/* ============================================
   FORM COMPONENTS
   ============================================ */
.form-input-buzzrfp {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--neutral-300);
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    transition: all var(--transition-speed) var(--transition-easing);
}

.form-input-buzzrfp::placeholder {
    color: var(--neutral-400);
}

.form-input-buzzrfp:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 160, 0.3);
}

.form-label-buzzrfp {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    margin-bottom: 0.375rem;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-buzzrfp {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-buzzrfp th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--neutral-50);
    font-weight: 600;
    color: var(--neutral-600);
    border-bottom: 1px solid var(--neutral-200);
}

.table-buzzrfp td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--neutral-100);
    color: var(--neutral-700);
}

.table-buzzrfp tr:hover td {
    background: var(--neutral-50);
}

/* ============================================
   DASHBOARD HEADER
   ============================================ */
.dashboard-header-buzzrfp {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
}

.dashboard-header-buzzrfp h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-header-buzzrfp p {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   PRIORITY INDICATORS
   ============================================ */
.priority-p1 {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
}

.priority-p2 {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: white;
}

.priority-p3 {
    background: linear-gradient(135deg, var(--info-500) 0%, var(--info-600) 100%);
    color: white;
}

/* ============================================
   COUNTDOWN CIRCLES
   ============================================ */
.countdown-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.countdown-urgent {
    background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
    color: white;
}

.countdown-warning {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: white;
}

.countdown-normal {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress-bar-buzzrfp {
    height: 8px;
    background-color: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill-buzzrfp {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
    transition: width 0.3s ease;
}

.progress-fill-success {
    background: linear-gradient(90deg, var(--success-500) 0%, var(--success-600) 100%);
}

.progress-fill-warning {
    background: linear-gradient(90deg, var(--warning-500) 0%, var(--warning-600) 100%);
}

.progress-fill-danger {
    background: linear-gradient(90deg, var(--danger-500) 0%, var(--danger-600) 100%);
}

/* ============================================
   TAB NAVIGATION - Pill Style
   ============================================ */
.tab-navigation-rfp {
    background: white;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tab-navigation-rfp::-webkit-scrollbar {
    height: 4px;
}

.tab-navigation-rfp::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.tab-navigation-rfp::-webkit-scrollbar-track {
    background: transparent;
}

.tab-btn-rfp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--neutral-500);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-easing);
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn-rfp:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

.tab-btn-rfp.active {
    background: var(--primary-600);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 160, 0.3);
}

/* ============================================
   DEADLINE CARDS
   ============================================ */
.deadline-card-urgent {
    border-left: 4px solid var(--danger-500);
    background: var(--danger-50);
}

.deadline-card-warning {
    border-left: 4px solid var(--warning-500);
    background: var(--warning-50);
}

.deadline-card-normal {
    border-left: 4px solid var(--info-500);
    background: var(--neutral-50);
}

/* ============================================
   GOVERNMENT THEME ACCENTS
   ============================================ */
.section-header-gov {
    background: var(--gov-navy);
    color: white;
    padding: 0.75rem 1.25rem;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid var(--gov-red);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.section-header-gov h2 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.gov-accent-gold {
    color: var(--gov-gold);
}

.gov-accent-red {
    color: var(--gov-red);
}

.bg-gov-navy {
    background-color: var(--gov-navy);
}

.bg-gov-blue {
    background-color: var(--gov-blue);
}

.text-gov-navy {
    color: var(--gov-navy);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }
.text-primary-900 { color: var(--primary-900); }
.text-success-600 { color: var(--success-600); }
.text-warning-600 { color: var(--warning-600); }
.text-danger-600 { color: var(--danger-600); }
.text-neutral-500 { color: var(--neutral-500); }
.text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-neutral-900 { color: var(--neutral-900); }

.bg-primary-50 { background-color: var(--primary-50); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-600 { background-color: var(--primary-600); }
.bg-primary-900 { background-color: var(--primary-900); }
.bg-neutral-50 { background-color: var(--neutral-50); }
.bg-neutral-100 { background-color: var(--neutral-100); }

.border-primary-200 { border-color: var(--primary-200); }
.border-neutral-200 { border-color: var(--neutral-200); }

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-speed) var(--transition-easing);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE LAYOUT
   ============================================ */

/* Laptop root scaling — scales ALL rem-based values globally */
@media (min-width: 1024px) and (max-width: 1439px) {
    html {
        font-size: 13px;
    }
}

/* Content wrapper responsive max-width */
#content-wrapper {
    width: 100%;
    transition: max-width 0.2s ease;
}

/* Tablet: full width */
@media (min-width: 768px) and (max-width: 1023px) {
    #content-wrapper { max-width: 100% !important; }
}

/* Laptop (1024-1439px): fill available space after sidebar */
@media (min-width: 1024px) and (max-width: 1439px) {
    #content-wrapper { max-width: 100% !important; }
}

/* Large screen (≥ 1440px): full 90rem */
@media (min-width: 1440px) {
    #content-wrapper { max-width: 90rem !important; }
}

/* Navbar matches content-wrapper widths */
.buzzrfp-nav > div:first-child {
    transition: max-width 0.2s ease;
}
@media (min-width: 1440px) {
    .buzzrfp-nav > div:first-child { max-width: 90rem; }
}
@media (min-width: 1024px) and (max-width: 1439px) {
    .buzzrfp-nav > div:first-child { max-width: 100%; }
}

/* Mobile: tighter spacing */
@media (max-width: 767px) {
    #content-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .page-header-accent {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .tab-btn-rfp {
        padding: 6px 10px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .btn-rfp-primary,
    .btn-rfp-secondary,
    .btn-rfp-navy {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Laptop: layout fixes — root font-size handles most scaling */
@media (min-width: 1024px) and (max-width: 1439px) {
    #content-wrapper {
        max-width: 100% !important;
    }

    /* Page header: stack title + buttons vertically on laptop */
    .page-header-accent .flex.lg\:flex-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    /* Action buttons: allow wrapping */
    .page-header-accent .flex-nowrap {
        flex-wrap: wrap !important;
    }

    /* Buttons: compact at laptop */
    .btn-rfp-primary,
    .btn-rfp-secondary,
    .btn-rfp-navy {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }

    /* Icon badge: smaller */
    .icon-badge {
        width: 2rem;
        height: 2rem;
    }
    .icon-badge i {
        font-size: 0.875rem !important;
    }

    /* Countdown circles */
    .countdown-circle {
        width: 36px;
        height: 36px;
    }
}

/* Tablet: medium spacing */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-header-accent {
        padding: 1.25rem;
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.2s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ============================================
   RFP PAGE COMPONENTS - DMMS-Style Patterns
   ============================================ */

/* RFP Primary Button - Navy-to-Blue gradient */
.btn-rfp-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, var(--gov-blue), var(--primary-600));
    color: white;
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-easing);
    box-shadow: 0 1px 3px rgba(32, 84, 147, 0.25);
    border: none;
    cursor: pointer;
}

.btn-rfp-primary:hover {
    background: linear-gradient(to right, var(--gov-navy), var(--gov-blue));
    box-shadow: 0 4px 12px rgba(32, 84, 147, 0.3);
}

/* RFP Secondary Button - White with gray border */
.btn-rfp-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: var(--neutral-700);
    border: 1px solid var(--neutral-300);
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-speed) var(--transition-easing);
    cursor: pointer;
}

.btn-rfp-secondary:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
}

/* RFP Navy Button - Deep navy gradient (awards/contracts) */
.btn-rfp-navy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, var(--gov-navy), var(--primary-900));
    color: white;
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-easing);
    box-shadow: 0 1px 3px rgba(17, 46, 81, 0.25);
    border: none;
    cursor: pointer;
}

.btn-rfp-navy:hover {
    background: linear-gradient(to right, #0A1F3A, var(--gov-navy));
    box-shadow: 0 4px 12px rgba(17, 46, 81, 0.3);
}

/* RFP Card - rounded-xl with border and hover shadow */
.card-rfp {
    background: white;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--neutral-200);
    transition: box-shadow var(--transition-speed) var(--transition-easing);
}

.card-rfp:hover {
    box-shadow: var(--shadow-card-hover);
}

/* RFP Opportunity/Award Card - with lift effect */
.card-rfp-item {
    background: white;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--neutral-200);
    padding: 1.25rem;
    transition: all var(--transition-speed) var(--transition-easing);
}

.card-rfp-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* RFP Status Badges - shared across all list pages */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-review { background-color: #f3f4f6; color: #4b5563; }
.status-qualification { background-color: #fef3c7; color: #92400e; }
.status-tech-build { background-color: #dbeafe; color: #1e40af; }
.status-admin-build { background-color: #fef3c7; color: #92400e; }
.status-sent-print { background-color: #e0e7ff; color: #3730a3; }
.status-submitted { background-color: #d1fae5; color: #065f46; }
.status-won { background-color: #10b981; color: white; }
.status-lost { background-color: #ef4444; color: white; }
.status-cancelled { background-color: #6b7280; color: white; }
.status-new { background-color: #dbeafe; color: #1e40af; }
.status-active { background-color: #d1fae5; color: #065f46; }
.status-inactive { background-color: #f3f4f6; color: #6b7280; }
.status-expired { background-color: #f3f4f6; color: #6b7280; }

/* RFP KPI Cards - with accent top bar */
.kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.kpi-card-navy::before { background: linear-gradient(to right, var(--gov-navy), var(--gov-blue)); }
.kpi-card-gold::before { background: linear-gradient(to right, #F59E0B, #FBBF24); }
.kpi-card-green::before { background: linear-gradient(to right, #16A34A, #22C55E); }
.kpi-card-blue::before { background: linear-gradient(to right, var(--primary-600), var(--primary-500)); }
.kpi-card-red::before { background: linear-gradient(to right, #DC2626, #EF4444); }
.kpi-card-purple::before { background: linear-gradient(to right, #7C3AED, #8B5CF6); }

/* RFP Table - navy gradient header */
.table-rfp {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-rfp thead th {
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, var(--gov-navy), var(--gov-blue));
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.table-rfp tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--neutral-100);
    color: var(--neutral-700);
}

.table-rfp tbody tr:hover td {
    background: var(--neutral-50);
}

/* ============================================
   PAGE LOAD ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.slide-in {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

/* Stagger delays for sequential card appearance */
.stagger-1 { animation-delay: 0s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ============================================
   ICON BADGES - Gradient Circle Icons
   ============================================ */
.icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--badge-color, #3b82f6) 0%, var(--badge-color-dark, #2563eb) 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.icon-badge-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.icon-badge-lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.hover-icon-badge:hover .icon-badge {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ============================================
   METRIC CARDS - Professional KPI Cards
   ============================================ */
.metric-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
}

/* Override Tailwind p-6 inside metric cards for consistent padding */
.metric-card.p-6 {
    padding: 1.5rem;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-color, #3b82f6) 0%, var(--card-color-light, #60a5fa) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.04);
    border-color: var(--card-color, #3b82f6);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 8px;
}

/* Scale KPI stat values and icons inside metric cards */
.metric-card .text-3xl {
    font-size: 1.875rem;
}

.metric-card .w-12 {
    width: 3rem;
    height: 3rem;
}

/* ============================================
   PAGE HEADER - White bg + accent border
   ============================================ */
.page-header-accent {
    background: white;
    border-left: 4px solid var(--header-accent, #3b82f6);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   TREND INDICATORS - Pill badges with arrows
   ============================================ */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-up { background: #d1fae5; color: #065f46; }
.trend-down { background: #fee2e2; color: #991b1b; }
.trend-neutral { background: #e0e7ff; color: #3730a3; }

/* ============================================
   LOADING SHIMMER
   ============================================ */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   CARD PRO - Section container with header
   ============================================ */
.card-pro {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.card-pro:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header-pro {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
    border-radius: 12px 12px 0 0;
}

.card-body-pro {
    padding: 1.25rem;
}

/* ============================================
   FORM THEME - Reusable form page styles
   ============================================ */

/* Form card wrapper */
.form-card-themed {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}

/* Form section divider */
.form-section-themed {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.form-section-themed:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Form section header */
.form-section-title-themed {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.form-section-title-themed i {
    color: #9ca3af;
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

/* Form labels */
.form-label-themed {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Form inputs (explicit class - used by client_form.html) */
.form-input-themed {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #111827;
    background-color: #f9fafb;
    transition: all 0.15s ease;
}
.form-input-themed:hover {
    border-color: #9ca3af;
}
.form-input-themed:focus {
    outline: none;
    border-color: var(--primary-600, #3B82A0);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 160, 0.15);
}
.form-input-themed:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}
.form-input-themed::placeholder {
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* ---- Global input styling within form cards ---- */
/* Overrides inline Tailwind via higher specificity (.form-card-themed + element = 0,1,1 > .px-2 = 0,1,0) */
.form-card-themed input[type="text"],
.form-card-themed input[type="email"],
.form-card-themed input[type="url"],
.form-card-themed input[type="tel"],
.form-card-themed input[type="date"],
.form-card-themed input[type="number"],
.form-card-themed input[type="password"],
.form-card-themed input[type="search"],
.form-card-themed select,
.form-card-themed textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #111827;
    background-color: #f9fafb;
    transition: all 0.15s ease;
}

.form-card-themed input[type="text"]:hover,
.form-card-themed input[type="email"]:hover,
.form-card-themed input[type="url"]:hover,
.form-card-themed input[type="tel"]:hover,
.form-card-themed input[type="date"]:hover,
.form-card-themed input[type="number"]:hover,
.form-card-themed input[type="password"]:hover,
.form-card-themed input[type="search"]:hover,
.form-card-themed select:hover,
.form-card-themed textarea:hover {
    border-color: #9ca3af;
}

.form-card-themed input[type="text"]:focus,
.form-card-themed input[type="email"]:focus,
.form-card-themed input[type="url"]:focus,
.form-card-themed input[type="tel"]:focus,
.form-card-themed input[type="date"]:focus,
.form-card-themed input[type="number"]:focus,
.form-card-themed input[type="password"]:focus,
.form-card-themed input[type="search"]:focus,
.form-card-themed select:focus,
.form-card-themed textarea:focus {
    outline: none;
    border-color: var(--primary-600, #3B82A0);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 160, 0.15);
}

/* Custom select arrow */
.form-card-themed select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 0 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.75rem;
    padding-right: 2.25rem;
}

/* Disabled state */
.form-card-themed input:disabled,
.form-card-themed select:disabled,
.form-card-themed textarea:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Placeholder styling */
.form-card-themed input::placeholder,
.form-card-themed textarea::placeholder {
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* Form labels within form cards */
.form-card-themed label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Form action bar */
.form-actions-themed {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

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

    .fade-in-up,
    .slide-in {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-buzzrfp,
    .card-buzzrfp,
    .form-input-buzzrfp {
        border-width: 2px;
    }
}
