/**
 * Shared Styles for Field Reports Pages
 * Provides consistent, modern, professional styling across all report pages
 */

:root {
    /* Color Palette - Reduced Green, Better Readability */
    --fr-primary: #4a9eff;
    --fr-primary-dark: #357abd;
    --fr-primary-light: #6bb0ff;
    --fr-secondary: #5a6c7d;
    --fr-accent: #2a3a4a;
    --fr-dark: #1a1f26;
    --fr-darker: #151920;
    
    /* Text Colors - Higher Contrast */
    --fr-text-primary: #ffffff;
    --fr-text-secondary: #e0e4e8;
    --fr-text-muted: #b8bcc0;
    
    /* Background Colors - Darker, Less Green */
    --fr-bg-primary: linear-gradient(135deg, #1a1f26 0%, #252b35 50%, #1e2429 100%);
    --fr-bg-card: rgba(42, 50, 62, 0.6);
    --fr-bg-card-hover: rgba(42, 50, 62, 0.8);
    --fr-bg-section: rgba(58, 70, 86, 0.2);
    
    /* Borders - Blue instead of Green */
    --fr-border: rgba(74, 158, 255, 0.4);
    --fr-border-hover: rgba(74, 158, 255, 0.6);
    --fr-border-active: #4a9eff;
    
    /* Shadows - Less Green Glow */
    --fr-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    --fr-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.6);
    --fr-shadow-glow: 0 0 20px rgba(74, 158, 255, 0.3);
    --fr-shadow-futuristic: 0 0 30px rgba(74, 158, 255, 0.2);
    
    /* Spacing */
    --fr-spacing-xs: 0.25rem;
    --fr-spacing-sm: 0.5rem;
    --fr-spacing-md: 1rem;
    --fr-spacing-lg: 1.5rem;
    --fr-spacing-xl: 2rem;
    
    /* Border Radius */
    --fr-radius-sm: 6px;
    --fr-radius-md: 8px;
    --fr-radius-lg: 12px;
    --fr-radius-xl: 16px;
    
    /* Transitions */
    --fr-transition: all 0.3s ease;
}

/* Base Page Container - Centered with max-width */
/* Using !important to ensure it overrides base template styles */
.fr-page-container {
    min-height: 100vh !important;
    background: var(--fr-bg-primary) !important;
    color: var(--fr-text-primary) !important;
    padding: var(--fr-spacing-lg) !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Page Header - Centered */
.fr-page-header {
    background: linear-gradient(135deg, rgba(42, 50, 62, 0.5) 0%, rgba(58, 70, 86, 0.3) 100%) !important;
    border: 2px solid var(--fr-border) !important;
    border-radius: var(--fr-radius-lg) !important;
    padding: var(--fr-spacing-xl) !important;
    margin: 0 auto var(--fr-spacing-xl) auto !important;
    box-shadow: var(--fr-shadow-futuristic) !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.fr-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.1), transparent);
    animation: fr-scan 3s linear infinite;
}

@keyframes fr-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.fr-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fr-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--fr-spacing-sm);
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.4);
}

.fr-page-subtitle {
    font-size: 1rem;
    color: var(--fr-text-secondary);
    margin-bottom: 0;
}

/* Cards and Sections - Centered */
.fr-card {
    background: var(--fr-bg-card) !important;
    border: 2px solid var(--fr-border) !important;
    border-radius: var(--fr-radius-lg) !important;
    padding: var(--fr-spacing-lg) !important;
    margin: 0 auto var(--fr-spacing-lg) auto !important;
    box-shadow: var(--fr-shadow) !important;
    transition: var(--fr-transition) !important;
    backdrop-filter: blur(10px) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.fr-card:hover {
    border-color: var(--fr-border-hover);
    box-shadow: var(--fr-shadow-hover);
    transform: translateY(-2px);
}

.fr-section {
    background: var(--fr-bg-section);
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-lg);
    padding: var(--fr-spacing-lg);
    margin-bottom: var(--fr-spacing-lg);
}

.fr-section-header {
    border-bottom: 2px solid var(--fr-border);
    padding-bottom: var(--fr-spacing-md);
    margin-bottom: var(--fr-spacing-md);
}

.fr-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fr-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Buttons */
.fr-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-md);
    background: transparent;
    color: var(--fr-text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--fr-transition);
    cursor: pointer;
    font-size: 0.875rem;
    text-align: center;
}

.fr-btn:hover {
    background: rgba(58, 70, 86, 0.4);
    border-color: var(--fr-primary);
    color: var(--fr-primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--fr-shadow-glow);
}

.fr-btn-primary {
    background: linear-gradient(135deg, var(--fr-secondary) 0%, #6b7d8a 100%);
    border-color: var(--fr-primary);
    color: var(--fr-text-primary);
    box-shadow: var(--fr-shadow), var(--fr-shadow-glow);
}

.fr-btn-primary:hover {
    background: linear-gradient(135deg, #6b7d8a 0%, var(--fr-secondary) 100%);
    box-shadow: var(--fr-shadow-hover), 0 0 30px rgba(74, 158, 255, 0.4);
    color: var(--fr-text-primary);
}

.fr-btn-success {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #28a745;
}

.fr-btn-success:hover {
    background: rgba(40, 167, 69, 0.3);
    border-color: #28a745;
    color: #28a745;
}

.fr-btn-danger {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    color: #dc3545;
}

.fr-btn-danger:hover {
    background: rgba(220, 53, 69, 0.3);
    border-color: #dc3545;
    color: #dc3545;
}

.fr-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Tables - Centered */
.fr-table-container {
    background: var(--fr-bg-card);
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-lg);
    padding: var(--fr-spacing-lg);
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.fr-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--fr-text-primary);
}

.fr-table thead {
    background: rgba(74, 158, 255, 0.15);
    border-bottom: 2px solid var(--fr-border);
}

.fr-table th {
    padding: var(--fr-spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--fr-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.fr-table td {
    padding: var(--fr-spacing-md);
    border-bottom: 1px solid var(--fr-border);
}

.fr-table tbody tr {
    transition: var(--fr-transition);
}

.fr-table tbody tr:hover {
    background: rgba(74, 158, 255, 0.1);
}

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

/* Forms */
.fr-form-group {
    margin-bottom: var(--fr-spacing-lg);
}

.fr-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fr-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--fr-spacing-sm);
}

.fr-input,
.fr-select,
.fr-textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-md);
    color: var(--fr-text-primary);
    font-size: 1rem;
    transition: var(--fr-transition);
}

.fr-input:focus,
.fr-select:focus,
.fr-textarea:focus {
    outline: none;
    border-color: var(--fr-primary);
    box-shadow: var(--fr-shadow-glow);
    background: rgba(0, 0, 0, 0.5);
}

.fr-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.fr-alert {
    padding: var(--fr-spacing-md);
    border-radius: var(--fr-radius-md);
    border: 2px solid;
    margin-bottom: var(--fr-spacing-lg);
}

.fr-alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.5);
    color: #17a2b8;
}

.fr-alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.5);
    color: #28a745;
}

.fr-alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.5);
    color: #ffc107;
}

.fr-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.5);
    color: #dc3545;
}

/* Badges */
.fr-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--fr-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fr-badge-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.fr-badge-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.fr-badge-info {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    border: 1px solid #17a2b8;
}

.fr-badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

/* Stats Cards - Centered */
.fr-stat-card {
    background: var(--fr-bg-card);
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-lg);
    padding: var(--fr-spacing-lg);
    text-align: center;
    transition: var(--fr-transition);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.fr-stat-card:hover {
    border-color: var(--fr-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--fr-shadow-hover);
}

.fr-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fr-primary);
    margin: var(--fr-spacing-sm) 0;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.4);
}

.fr-stat-label {
    font-size: 0.875rem;
    color: var(--fr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Grid Layouts - Centered */
.fr-grid {
    display: grid;
    gap: var(--fr-spacing-lg);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fr-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.fr-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.fr-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Utility Classes */
.fr-text-center {
    text-align: center;
}

.fr-text-muted {
    color: var(--fr-text-muted);
}

.fr-text-primary {
    color: var(--fr-primary);
}

.fr-mb-0 {
    margin-bottom: 0;
}

.fr-mt-0 {
    margin-top: 0;
}

.fr-required-badge {
    color: #dc3545;
    font-weight: 700;
}

/* Layout Utilities */
.fr-flex-wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.fr-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fr-grid-250-1fr {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.fr-width-100 {
    width: 100%;
}

/* Spacing Utilities */
.fr-mt-2rem {
    margin-top: 2rem;
}

.fr-mt-1rem {
    margin-top: 1rem;
}

.fr-mt-0-5rem {
    margin-top: 0.5rem;
}

.fr-mb-2rem {
    margin-bottom: 2rem;
}

.fr-mb-1rem {
    margin-bottom: 1rem;
}

/* Typography Utilities */
.fr-font-size-1rem {
    font-size: 1rem;
}

.fr-font-size-1-5rem {
    font-size: 1.5rem;
}

.fr-font-size-0-875rem {
    font-size: 0.875rem;
}

.fr-font-size-0-75rem {
    font-size: 0.75rem;
}

/* Display Utilities */
.fr-display-block {
    display: block;
}

.fr-text-align-center {
    text-align: center;
}

/* Padding Utilities */
.fr-padding-0-5rem {
    padding: 0.5rem;
}

.fr-padding-1rem-2rem {
    padding: 1rem 2rem;
}

/* Color Utilities */
.fr-color-text-primary {
    color: var(--fr-text-primary);
}

.fr-color-text-muted {
    color: var(--fr-text-muted);
}

.fr-color-primary {
    color: var(--fr-primary);
}

/* Border Radius */
.fr-border-radius-6px {
    border-radius: 6px;
}

/* Line Height */
.fr-line-height-1-6 {
    line-height: 1.6;
}

/* White Space */
.fr-white-space-pre-wrap {
    white-space: pre-wrap;
}

/* Width utilities */
.fr-width-50px {
    width: 50px;
}

.fr-min-width-40px {
    min-width: 40px;
}

/* Text decoration */
.fr-text-decoration-none {
    text-decoration: none;
}

.fr-font-weight-600 {
    font-weight: 600;
}

.fr-font-weight-700 {
    font-weight: 700;
}

/* Padding utilities */
.fr-padding-1-5rem {
    padding: 1.5rem;
}

.fr-margin-0-5rem-0 {
    margin: 0.5rem 0;
}

/* Icon color */
.fr-icon-primary {
    color: var(--fr-primary);
}

/* Additional utility classes */
.fr-height-auto {
    height: auto;
}

.fr-font-size-1-1rem {
    font-size: 1.1rem;
}

/* Enhanced card animations */
.fr-card {
    transition: var(--fr-transition);
}

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

/* Enhanced section headers */
.fr-section-header {
    position: relative;
    overflow: hidden;
}

.fr-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.1), transparent);
    animation: fr-scan 4s linear infinite;
}

/* Enhanced buttons */
.fr-btn {
    transition: var(--fr-transition);
    position: relative;
    overflow: hidden;
}

.fr-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fr-btn:hover::before {
    width: 300px;
    height: 300px;
}

.fr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}

/* Enhanced stat cards */
.fr-stat-card {
    transition: var(--fr-transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.fr-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.1) 0%, transparent 70%);
    animation: fr-pulse 3s ease-in-out infinite;
}

@keyframes fr-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.fr-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fr-shadow-glow);
}

/* Enhanced table row hover */
.fr-table tbody tr:hover {
    background: var(--fr-bg-card-hover);
    transform: scale(1.01);
}

/* Responsive */
@media (max-width: 768px) {
    .fr-page-container {
        padding: var(--fr-spacing-md);
        max-width: 100%;
    }
    
    .fr-page-title {
        font-size: 1.5rem;
    }
    
    .fr-grid-2,
    .fr-grid-3,
    .fr-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .fr-table-container {
        padding: var(--fr-spacing-sm);
    }
    
    .fr-table {
        font-size: 0.875rem;
    }
    
    .fr-table th,
    .fr-table td {
        padding: var(--fr-spacing-sm);
    }
}

/* Ensure all content is centered */
.fr-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto var(--fr-spacing-lg) auto;
}

/* Chart cards - centered */
.fr-chart-card {
    background: var(--fr-bg-card);
    border: 2px solid var(--fr-border);
    border-radius: var(--fr-radius-lg);
    padding: var(--fr-spacing-lg);
    margin: 0 auto var(--fr-spacing-lg) auto;
    box-shadow: var(--fr-shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fr-chart-card:hover {
    border-color: var(--fr-border-hover);
    box-shadow: var(--fr-shadow-hover);
    transform: translateY(-2px);
}

/* Dashboard content wrapper - centered */
.dashboard-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Photo thumbnail styles - replaces inline styles for CSP compliance */
.fr-photo-thumbnail {
    max-height: 100px;
    object-fit: cover;
}

.fr-photo-more {
    min-height: 100px;
}

