/* KineTrace Design System - Inspired by Symclarity's Clean Aesthetic */

/* =============================================================================
   COLOR PALETTE - Minimal and Professional
   ============================================================================= */
:root {
    /* Primary Colors */
    --primary-dark: #374151;
    --primary-medium: #6b7280;
    --primary-light: #9ca3af;
    
    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-light: rgba(59, 130, 246, 0.1);
    
    /* Background Colors */
    --background-primary: #fafafa;
    --background-secondary: #ffffff;
    --background-tertiary: #f3f4f6;
    
    /* Text Colors - High Contrast */
    --text-primary: #1f2937;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-heading: #111827;
    
    /* Light Text for Dark Backgrounds */
    --text-primary-light: #ffffff;
    --text-secondary-light: rgba(255, 255, 255, 0.9);
    --text-muted-light: rgba(255, 255, 255, 0.7);
    
    /* Border Colors */
    --border-light: #3b82f6;
    --border-medium: #e2e8f0;
    --border-dark: #d1d5db;
    
    /* Shadow System */
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.05);
    
    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* =============================================================================
   RESET AND BASE STYLES
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Ubuntu', "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h1 { 
    font-size: var(--font-5xl); 
    font-weight: 300;
    letter-spacing: -0.03em;
}

h2 { 
    font-size: var(--font-3xl);
    font-weight: 400;
}

h3 { 
    font-size: var(--font-2xl);
    font-weight: 500;
}

h4 { 
    font-size: var(--font-xl);
    font-weight: 500;
}

h5 { 
    font-size: var(--font-lg);
    font-weight: 600;
}

h6 { 
    font-size: var(--font-base);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-blue-hover);
}

/* Typography Utility Classes for Consistency */
.heading-hero {
    font-size: var(--font-5xl);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.heading-section {
    font-size: var(--font-4xl);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.heading-subsection {
    font-size: var(--font-2xl);
    font-weight: 400;
    margin-bottom: var(--space-md);
}

.heading-card {
    font-size: var(--font-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.heading-small {
    font-size: var(--font-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.text-lead {
    font-size: var(--font-lg);
    line-height: 1.6;
    color: var(--text-secondary);
}

.text-body {
    font-size: var(--font-base);
    line-height: 1.6;
    color: var(--text-primary);
}

.text-small {
    font-size: var(--font-sm);
    line-height: 1.5;
    color: var(--text-secondary);
}

.text-xs {
    font-size: var(--font-xs);
    line-height: 1.4;
    color: var(--text-muted);
}

.text-caption {
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: var(--text-muted);
}

/* Responsive Typography */
@media (max-width: 768px) {
    .heading-hero {
        font-size: var(--font-4xl);
    }
    
    .heading-section {
        font-size: var(--font-3xl);
    }
    
    .heading-subsection {
        font-size: var(--font-xl);
    }
}

/* Radio Card and Checkbox Components */
.radio-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-content {
    padding: 1rem;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--background-secondary);
    transition: all 0.2s ease;
}

.radio-card:hover .radio-card-content {
    border-color: var(--accent-blue);
    background: var(--accent-blue-light);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
    border-color: var(--accent-blue);
    background: var(--accent-blue-light);
    box-shadow: 0 0 0 1px var(--accent-blue);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: var(--radius-sm);
}

.checkbox-item:hover {
    background: var(--background-tertiary);
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    accent-color: var(--accent-blue);
}

/* =============================================================================
   NAVIGATION - Glassmorphism Style
   ============================================================================= */
.nav-professional {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px var(--shadow-soft);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 700;
    font-size: var(--font-3xl);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-sm);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--background-tertiary);
}

.nav-link.active {
    color: var(--accent-blue);
    background: var(--accent-blue-light);
}

/* Separator between nav items */
.nav-link:not(:last-child)::after {
    content: "";
    position: absolute;
    right: calc(var(--space-xs) * -1);
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background-color: var(--border-light);
    opacity: 0.3;
}

/* =============================================================================
   BUTTONS - Clean and Modern
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: var(--font-sm);
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px var(--shadow-soft);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-medium);
    border-color: var(--primary-medium);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    background: var(--background-tertiary);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-soft);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-soft);
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: var(--font-xs);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-base);
    border-radius: var(--radius-xl);
}

/* =============================================================================
   CARDS - Enhanced Clean Design Inspired by Symclarity
   ============================================================================= */
.card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 2px solid var(--accent-blue-light);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
}

/* Card Variants */
.card-feature {
    text-align: center;
    padding: 2.5rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Keep these for backward compatibility but they now match base card style */
.card-highlight {
    /* Inherits base card styling */
}

.card-gradient {
    /* Inherits base card styling */
}

.card-compact {
    padding: 1.5rem;
}

/* Card Grid System */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    overflow: visible;
}

.cards-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    overflow: visible;
}

.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    overflow: visible;
}

.cards-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    overflow: visible;
}

/* Card Header Styles */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid #e2e8f0;
}

.card-header-clean {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue-light);
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.card-icon-large {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    background: #ffffff;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.3;
}

.card-subtitle {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card-body {
    color: var(--text-primary);
    line-height: 1.6;
}

.card-body p:last-child {
    margin-bottom: 0;
}

/* Card Footer */
.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Card Category Badge */
.card-category {
    display: inline-block;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    background: var(--accent-blue);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.card-action-btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    text-align: center;
}

/* Methodology Cards */
.methodology-card {
    position: relative;
    padding-top: 5rem;
}

.methodology-number {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background: #ffffff;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    z-index: 1;
}

.methodology-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    text-align: center;
}

.methodology-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 1rem;
    text-align: center;
}

/* Stats Card */
.stats-card {
    text-align: center;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1;
    margin-bottom: 1rem;
}

.stats-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.testimonial-quote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-weight: 600;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.125rem;
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =============================================================================
   FORMS - Clean Input Styles
   ============================================================================= */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 16px; /* Prevents zoom on mobile */
    font-family: inherit;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--background-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

@media (min-width: 769px) {
    .form-input,
    .form-select,
    .form-textarea {
        font-size: var(--font-base);
    }
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

/* =============================================================================
   TABLES - Clean and Readable
   ============================================================================= */
.table-professional {
    width: 100%;
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow-soft);
    border: 1px solid var(--border-medium);
}

.table-professional thead {
    background: var(--background-tertiary);
    border-bottom: 1px solid var(--border-medium);
}

.table-professional th {
    padding: var(--space-md);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-heading);
    text-align: left;
}

.table-professional td {
    padding: var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-medium);
}

.table-professional tbody tr:last-child td {
    border-bottom: none;
}

.table-professional tbody tr:hover {
    background: var(--background-tertiary);
}

/* =============================================================================
   BADGES - Status Indicators
   ============================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* =============================================================================
   CONTAINERS AND LAYOUT
   ============================================================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-heading { color: var(--text-heading); }

/* Dark Background Utilities - Comprehensive Coverage */
.bg-dark, 
.bg-gradient,
[style*="background: linear-gradient"],
[style*="background-color: var(--primary-dark)"],
[style*="background-color: var(--accent-blue)"],
section[style*="background: linear-gradient"],
.section[style*="background: linear-gradient"] {
    color: var(--text-primary-light) !important;
}

/* All headings on dark backgrounds */
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-gradient h1, .bg-gradient h2, .bg-gradient h3, .bg-gradient h4, .bg-gradient h5, .bg-gradient h6,
[style*="background: linear-gradient"] h1, 
[style*="background: linear-gradient"] h2, 
[style*="background: linear-gradient"] h3,
[style*="background: linear-gradient"] h4,
[style*="background: linear-gradient"] h5,
[style*="background: linear-gradient"] h6,
section[style*="background: linear-gradient"] h1,
section[style*="background: linear-gradient"] h2,
section[style*="background: linear-gradient"] h3,
section[style*="background: linear-gradient"] h4,
section[style*="background: linear-gradient"] h5,
section[style*="background: linear-gradient"] h6,
.section[style*="background: linear-gradient"] h1,
.section[style*="background: linear-gradient"] h2,
.section[style*="background: linear-gradient"] h3,
.section[style*="background: linear-gradient"] h4,
.section[style*="background: linear-gradient"] h5,
.section[style*="background: linear-gradient"] h6 {
    color: var(--text-primary-light) !important;
}

/* All paragraphs on dark backgrounds */
.bg-dark p,
.bg-gradient p,
[style*="background: linear-gradient"] p,
section[style*="background: linear-gradient"] p,
.section[style*="background: linear-gradient"] p {
    color: var(--text-primary-light) !important;
}

/* Spans on dark backgrounds */
.bg-dark span,
.bg-gradient span,
[style*="background: linear-gradient"] span,
section[style*="background: linear-gradient"] span,
.section[style*="background: linear-gradient"] span {
    color: inherit !important;
}

/* Secondary text on dark backgrounds */
.bg-dark .text-secondary,
.bg-gradient .text-secondary,
[style*="background: linear-gradient"] .text-secondary,
section[style*="background: linear-gradient"] .text-secondary,
.section[style*="background: linear-gradient"] .text-secondary {
    color: var(--text-secondary-light) !important;
}

/* Muted text on dark backgrounds */
.bg-dark .text-muted,
.bg-gradient .text-muted,
[style*="background: linear-gradient"] .text-muted,
section[style*="background: linear-gradient"] .text-muted,
.section[style*="background: linear-gradient"] .text-muted {
    color: var(--text-muted-light) !important;
}

.bg-primary { background-color: var(--background-primary); }
.bg-secondary { background-color: var(--background-secondary); }
.bg-tertiary { background-color: var(--background-tertiary); }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }

/* =============================================================================
   RESPONSIVE DESIGN FOR CARD GRIDS
   ============================================================================= */
@media (max-width: 768px) {
    .cards-grid,
    .cards-grid-2,
    .cards-grid-3,
    .cards-grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .methodology-card {
        padding-top: 4rem;
    }
    
    .methodology-number {
        top: 1.5rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }
    
    .card-icon-large {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }
    
    .stats-number {
        font-size: 2.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .cards-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .cards-grid-2 {
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .cards-grid-3 {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* =============================================================================
   METRIC HOVER CALLOUTS
   ============================================================================= */
.metric-hover {
    position: relative;
    display: inline-block;
    cursor: help;
    color: var(--text-heading);
    transition: color 0.2s ease;
    z-index: 1;
}

.metric-hover:hover {
    color: var(--accent-blue);
    z-index: 1000000;
}

.metric-callout {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 300px;
    max-width: 90vw;
    padding: var(--space-md);
    background: var(--background-secondary);
    border: 2px solid var(--accent-blue-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
    z-index: 9999999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

/* Arrow pointing up */
.metric-callout::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--accent-blue-light);
}

.metric-callout::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--background-secondary);
}

.metric-hover:hover .metric-callout {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

/* Alternative positioning for tooltips that might get clipped */
.metric-hover.tooltip-up .metric-callout {
    top: auto;
    bottom: 100%;
    transform: translateX(-50%) translateY(-10px);
}

.metric-hover.tooltip-up:hover .metric-callout {
    transform: translateX(-50%) translateY(-5px);
}

/* Arrow pointing down for upward tooltips */
.metric-hover.tooltip-up .metric-callout::before {
    top: auto;
    bottom: -10px;
    border-bottom: none;
    border-top: 10px solid var(--accent-blue-light);
}

.metric-hover.tooltip-up .metric-callout::after {
    top: auto;
    bottom: -8px;
    border-bottom: none;
    border-top: 8px solid var(--background-secondary);
}

.callout-text {
    display: block;
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    font-weight: normal;
}

.callout-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.callout-link:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-1px);
}

.callout-link i {
    font-size: var(--font-xs);
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 768px) {
    h1 { font-size: var(--font-3xl); }
    h2 { font-size: var(--font-2xl); }
    h3 { font-size: var(--font-xl); }
    
    .nav-container {
        padding: 0 var(--space-md);
    }
    
    .nav-links {
        gap: 0;
    }
    
    .nav-link {
        padding: var(--space-sm);
        font-size: var(--font-xs);
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: var(--font-sm);
        min-height: 44px; /* Proper touch target */
        width: 100%; /* Full width on mobile for easier tapping */
    }
    
    /* Stack buttons vertically on mobile */
    .btn + .btn {
        margin-top: 0.5rem;
    }
    
    /* Container padding adjustments */
    .container {
        padding: 0 1rem;
    }
    
    /* Card padding adjustments */
    .card {
        padding: 1rem;
    }
}
/* ============================================================================= 
   DASHBOARD STYLES - Role-based Message Centers and Admin Console
   ============================================================================= */

/* Role-Based Message Centers */
.message-center {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.message-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.message-title {
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
}

.message-subtitle {
    font-size: var(--font-lg);
    color: var(--text-secondary);
    font-weight: 500;
}

.message-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.message-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.action-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Role-specific message styling */
.platform-admin-message {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(248, 113, 113, 0.05) 100%);
    border-color: rgba(220, 38, 38, 0.2);
}

.platform-admin-message .action-badge {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.admin-message {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(250, 204, 21, 0.05) 100%);
    border-color: rgba(234, 179, 8, 0.2);
}

.admin-message .action-badge {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.2);
}

.user-message {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(74, 222, 128, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.user-message .action-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

/* Statistics Cards */
.stat-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
    border-color: var(--accent-blue);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-lg);
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-description {
    font-size: var(--font-xs);
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    border: 1px solid;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #d97706;
    border-color: rgba(234, 179, 8, 0.2);
}

.badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.2);
}

/* Dashboard Grid Layouts */
.grid-3 { 
    grid-template-columns: repeat(3, 1fr); 
}

.grid-4 { 
    grid-template-columns: repeat(4, 1fr); 
}

/* Dashboard Tables */
.dashboard-table {
    width: 100%;
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow-soft);
    border: 1px solid var(--border-medium);
    border-collapse: separate;
    border-spacing: 0;
}

.dashboard-table thead {
    background: var(--background-tertiary);
    border-bottom: 1px solid var(--border-medium);
}

.dashboard-table th {
    padding: var(--space-md);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-heading);
    text-align: left;
    border: none;
}

.dashboard-table td {
    padding: var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-medium);
    border-left: none;
    border-right: none;
    border-top: none;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr:hover {
    background: var(--background-tertiary);
}

/* Responsive Grid Updates */
@media (max-width: 768px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   MULTI-ROLE NAVIGATION DROPDOWN
   ============================================================================= */

/* Navigation Dropdown Container */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Navigation Dropdown Menu */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--background-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: var(--space-sm) 0;
    margin-top: 0.25rem;
}

/* Navigation Dropdown Items */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.nav-dropdown-item:hover {
    background: var(--background-tertiary);
    color: var(--text-primary);
}

.nav-dropdown-item i {
    width: 16px;
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.nav-dropdown-item:hover i {
    color: var(--accent-blue);
}

/* Active dropdown item */
.nav-dropdown-item.active {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.nav-dropdown-item.active i {
    color: var(--accent-blue);
}

/* Dropdown header styles */
.nav-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-dropdown-header strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.nav-dropdown-subtitle {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.nav-dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* =============================================================================
   IMPERSONATION BANNER
   ============================================================================= */

/* Impersonation Banner Container */
.nav-impersonation {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(248, 113, 113, 0.05) 100%);
    border: 1px solid rgba(245, 101, 101, 0.2);
    border-radius: var(--radius-md);
    font-size: var(--font-xs);
    color: #dc2626;
    font-weight: 500;
}

.impersonation-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.impersonation-text i {
    font-size: var(--font-xs);
}

.impersonation-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    border-radius: var(--radius-sm);
    color: #dc2626;
    cursor: pointer;
    font-size: var(--font-xs);
    transition: all 0.2s ease;
}

.impersonation-stop:hover {
    background: rgba(245, 101, 101, 0.2);
    border-color: rgba(245, 101, 101, 0.4);
}

/* Responsive Navigation Updates */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        min-width: 180px;
        right: 0;
        left: auto;
    }
    
    .nav-impersonation {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .impersonation-stop {
        width: 16px;
        height: 16px;
    }
}

/* User Name Display in Navigation */
.nav-user-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.nav-user-display i {
    font-size: 1.125rem;
    color: var(--accent-blue);
}

.nav-user-display:hover {
    background: var(--accent-blue-light);
    border-color: var(--accent-blue);
}

/* Mobile responsive for user display */
@media (max-width: 768px) {
    .nav-user-display {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .nav-user-display i {
        font-size: 1rem;
    }
    
    #user-name-text {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

