﻿/* Anglo Eastern Integration Services - Custom Styles */

:root {
    /* Anglo Eastern Professional Theme - No Orange */
    --ae-primary: #1B365D;      /* Deep Navy Blue (Maritime Authority) */
    --ae-secondary: #2E5984;    /* Ocean Blue */
    --ae-accent: #4A90B8;       /* Professional Light Blue */
    --ae-light: #F8FAFB;       /* Off White */
    --ae-dark: #0F1419;        /* Deep Maritime Blue */
    --ae-success: #27AE60;     /* Maritime Green (Port/Starboard) */
    --ae-warning: #8B9DC3;     /* Professional Blue-Gray Warning */
    --ae-danger: #7A8FA3;      /* Muted Blue-Gray for Errors */
    --ae-text: #2C3E50;        /* Dark Blue Gray */
    --ae-border: #E8F4FD;      /* Light Blue Border */
    --ae-muted: #7F8C8D;       /* Maritime Gray */
    
    /* Clean Backgrounds - Professional Blue Tones */
    --ae-bg-primary: #ffffff;   /* Pure White Background */
    --ae-bg-secondary: #F8FAFB; /* Light Maritime Background */
    --ae-bg-section: #F0F6FC;   /* Section Header Background */
    --ae-bg-hover: #E8F4FD;     /* Hover Background */
    
    /* Professional Maritime Gradients - Blue Only */
    --ae-gradient-primary: linear-gradient(135deg, #1B365D 0%, #2E5984 100%);
    --ae-gradient-light: linear-gradient(135deg, #F8FAFB 0%, #E8F4FD 100%);
    --ae-gradient-accent: linear-gradient(135deg, #4A90B8 0%, #2E5984 100%);
    
    /* Typography */
    --ae-font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --ae-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Spacing - Compact but Professional */
    --ae-spacing-xs: 4px;
    --ae-spacing-sm: 8px;
    --ae-spacing-md: 12px;
    --ae-spacing-lg: 16px;
    --ae-spacing-xl: 20px;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--ae-font-family);
    line-height: 1.5;
    color: var(--ae-text);
    background: var(--ae-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 14px;
}

/* Fix for question marks and emoji rendering */
.emoji-support,
.table th,
.table td,
.badge,
.btn {
    font-family: var(--ae-font-family), 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif !important;
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
}

/* MainLayout Styles */
.app-container {
    display: flex;
    height: 100vh;
    font-family: var(--ae-font-family);
    background: var(--ae-bg-secondary);
}

/* Override any existing gradient backgrounds */
.container-fluid[style*="gradient"],
div[style*="gradient"] {
    background: var(--ae-bg-secondary) !important;
}

/* Anglo Eastern Branded Sidebar */
.sidebar {
    width: 280px;
    background: var(--ae-gradient-primary);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(27, 54, 93, 0.25);
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: var(--ae-accent);
}

/* Brand Header with Real Logo - Optimized Sizing */
.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container {
    position: relative;
    flex-shrink: 0;
}

.ae-logo {
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.ae-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 3px;
    max-width: 100%;
    max-height: 100%;
}

.brand-text {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    overflow: hidden;
}

.company-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Info Section */
.user-info {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    gap: 0.75rem;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.user-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

/* Navigation */
.nav-list {
    flex: 1;
    padding: 1rem 0;
}

.nav-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    position: relative;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background: var(--ae-gradient-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 184, 0.3);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 25px;
    background: var(--ae-accent);
    border-radius: 2px;
}

.nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

.company-info {
    text-align: center;
}

.footer-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.footer-subtext {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--ae-bg-secondary);
    overflow: hidden;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Custom scrollbar */
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: var(--ae-secondary);
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--ae-primary);
}

/* Custom DataGrid Styles */
table.data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Modern Enterprise Table Headers */
.table thead th {
    background: var(--ae-bg-section) !important;
    color: var(--ae-secondary) !important;
    font-weight: 500 !important;
    border-bottom: 1px solid var(--ae-border) !important;
    padding: var(--ae-spacing-sm) var(--ae-spacing-md) !important;
    text-transform: none !important;
    font-size: 13px !important;
    letter-spacing: 0 !important;
    position: relative;
    text-shadow: none !important;
    text-decoration: none !important;
}

/* Blazorise DataGrid specific header styling */
.blazorise .table thead th,
.blazorise .table-responsive .table thead th,
.dataGrid thead tr th,
.table[class*="dataGrid"] thead th,
.table.mb-0 thead th {
    background: var(--ae-bg-section) !important;
    color: var(--ae-secondary) !important;
    font-weight: 500 !important;
    border: none !important;
    border-bottom: 1px solid var(--ae-border) !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: var(--ae-spacing-sm) var(--ae-spacing-md) !important;
    font-size: 13px !important;
}

/* Force visibility for all table headers */
thead th,
thead th *,
th,
th * {
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
}

/* Ensure header text is always visible */
.table thead th:not([style*="display: none"]) {
    color: white !important;
    background: var(--ae-gradient-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override any potential Blazorise header styling conflicts */
.table[class*="blazorise"] thead th,
.table[class*="dataGrid"] thead th,
.table[class*="data-grid"] thead th {
    background: linear-gradient(135deg, #1B365D 0%, #2E5984 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

/* Force header text color in all possible contexts */
.table thead th span,
.table thead th div,
.table thead th a,
.table thead th button,
.table thead th input,
.table thead th .form-control {
    color: white !important;
    background: transparent !important;
}

/* Fix for HeaderThemeContrast.Light override */
.table[class*="theme-contrast-light"] thead th,
.table.thead-light thead th {
    background: var(--ae-gradient-primary) !important;
    color: white !important;
    border-color: var(--ae-primary) !important;
}

/* Enhanced table styling - Compact */
.table tbody td {
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    padding: var(--ae-spacing-sm) var(--ae-spacing-md);
    font-size: 12px;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: var(--ae-bg-hover);
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.status-arrow {
    color: var(--ae-muted);
    font-size: 12px;
    margin: 0 4px;
    font-weight: bold;
}

/* Anglo Eastern Clean Card Styles - Compact */
.card {
    transition: all 0.2s ease;
    border-radius: 4px;
    border: 1px solid var(--ae-border);
    background: var(--ae-bg-primary);
    box-shadow: none;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(27, 54, 93, 0.1);
}

.card-ae {
    border: 1px solid var(--ae-border);
    border-radius: 4px;
    box-shadow: none;
    background: var(--ae-bg-primary);
    transition: all 0.2s ease;
    margin: var(--ae-spacing-sm);
}

.card-ae:hover {
    box-shadow: 0 2px 4px rgba(27, 54, 93, 0.1);
}

/* Compact card body */
.card-body {
    padding: var(--ae-spacing-md) !important;
}

.card-body.compact {
    padding: var(--ae-spacing-sm) var(--ae-spacing-md) !important;
}

/* Small feature cards */
.card-feature {
    border: 1px solid var(--ae-border);
    border-radius: 4px;
    background: var(--ae-bg-primary);
    padding: var(--ae-spacing-md);
    margin-bottom: var(--ae-spacing-sm);
    transition: all 0.2s ease;
}

.card-feature:hover {
    border-color: var(--ae-accent);
    box-shadow: 0 2px 4px rgba(74, 144, 184, 0.15);
}

.card-feature .feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ae-primary);
    margin-bottom: var(--ae-spacing-xs);
}

.card-feature .feature-description {
    font-size: 12px;
    color: var(--ae-muted);
    line-height: 1.4;
    margin-bottom: var(--ae-spacing-sm);
}

.card-feature .feature-action {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    text-decoration: none;
    background: var(--ae-gradient-primary);
    color: white;
    display: inline-block;
    transition: all 0.2s ease;
}

.card-feature .feature-action:hover {
    background: var(--ae-accent);
    color: white;
    text-decoration: none;
}

/* Remove large card animations */
.quick-access-card {
    transform: none !important;
    border: 1px solid var(--ae-border) !important;
    box-shadow: none !important;
}

.quick-access-card:hover {
    transform: none !important;
    border-color: var(--ae-accent) !important;
    box-shadow: 0 2px 4px rgba(74, 144, 184, 0.15) !important;
}

/* Form controls */
.form-control, .form-select {
    border-radius: 8px;
    transition: all 0.3s ease;
    border-color: var(--ae-border);
}

.form-control:focus, .form-select:focus {
    border-color: var(--ae-secondary);
    box-shadow: 0 0 0 0.2rem rgba(46, 89, 132, 0.25);
}

/* Form label styling */
.form-label.small {
    font-weight: 600;
    color: var(--ae-text);
    margin-bottom: 4px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* Index page styles with optimized logo sizing */
.welcome-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.ae-logo-large {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 8px 30px rgba(27, 54, 93, 0.2);
    border: 3px solid rgba(27, 54, 93, 0.1);
}

.ae-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.ae-logo-medium {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(27, 54, 93, 0.2);
    border: 2px solid rgba(27, 54, 93, 0.1);
}

.ae-logo-medium img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.maritime-divider {
    width: 100px;
    height: 3px;
    background: var(--ae-gradient-accent);
    margin: 0 auto;
    border-radius: 2px;
}

.quick-access-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-access-card:hover {
    transform: translateY(-8px);
    border-color: var(--ae-accent);
    box-shadow: 0 15px 35px rgba(27, 54, 93, 0.15);
}

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ae-border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: var(--ae-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    color: var(--ae-text);
    font-weight: 600;
}

.maritime-stats {
    padding: 1rem;
    background: var(--ae-gradient-light);
    border-radius: 8px;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ae-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--ae-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

/* Utility Classes */
.text-ae-primary { color: var(--ae-primary) !important; }
.text-ae-secondary { color: var(--ae-secondary) !important; }
.text-ae-accent { color: var(--ae-accent) !important; }
.text-ae-muted { color: var(--ae-muted) !important; }

.bg-ae-primary { background-color: var(--ae-primary) !important; }
.bg-ae-secondary { background-color: var(--ae-secondary) !important; }
.bg-ae-accent { background-color: var(--ae-accent) !important; }
.bg-ae-light { background-color: var(--ae-light) !important; }

/* Anglo Eastern Button Styles - No Orange */
.btn-ae-primary {
    background: var(--ae-gradient-primary);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(27, 54, 93, 0.2);
}

.btn-ae-primary:hover {
    background: var(--ae-accent);
    box-shadow: 0 2px 6px rgba(74, 144, 184, 0.3);
    color: white;
}

.btn-ae-secondary {
    background: var(--ae-secondary);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(46, 89, 132, 0.2);
}

.btn-ae-secondary:hover {
    background: var(--ae-accent);
    box-shadow: 0 2px 6px rgba(74, 144, 184, 0.3);
    color: white;
}

/* Anglo Eastern Badge Styles - Professional Blue Tones */
.badge-ae-primary {
    background: var(--ae-gradient-primary);
    color: white;
}

.badge-ae-success {
    background: var(--ae-success);
    color: white;
}

.badge-ae-warning {
    background: var(--ae-warning);
    color: white;
}

.badge-ae-danger {
    background: var(--ae-danger);
    color: white;
}

/* Anglo Eastern Compact Card Header */
.card-ae-header {
    background: var(--ae-bg-section);
    border-bottom: 1px solid var(--ae-border);
    padding: var(--ae-spacing-sm) var(--ae-spacing-md);
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    font-size: 13px;
    color: var(--ae-primary);
}

/* Compact page header */
.page-header {
    background: var(--ae-bg-primary);
    border-bottom: 1px solid var(--ae-border);
    padding: var(--ae-spacing-md) var(--ae-spacing-lg);
    margin-bottom: 0;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ae-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 12px;
    color: var(--ae-muted);
    margin: 0;
}

/* Compact stats display */
.stats-compact {
    display: flex;
    gap: var(--ae-spacing-xl);
    align-items: center;
    padding: var(--ae-spacing-sm) var(--ae-spacing-md);
    background: var(--ae-bg-secondary);
    border-bottom: 1px solid var(--ae-border);
    font-size: 12px;
}

.stat-compact {
    display: flex;
    align-items: center;
    gap: var(--ae-spacing-xs);
}

.stat-value {
    font-weight: 600;
    color: var(--ae-primary);
}

.stat-label {
    color: var(--ae-muted);
}

/* Professional Status Badges */
.badge-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
}

.badge-status.complete {
    background: #d4edda;
    color: #155724;
}

.badge-status.processing {
    background: #fff3cd;
    color: #856404;
}

.badge-status.error {
    background: #f8d7da;
    color: #721c24;
}

.badge-status.pending {
    background: #d1ecf1;
    color: #0c5460;
}

/* Clean Section Headers */
.section-header {
    background: var(--ae-bg-primary);
    padding: var(--ae-spacing-sm) var(--ae-spacing-lg);
    border-bottom: 2px solid var(--ae-bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-weight: 600;
    color: var(--ae-primary);
    font-size: 16px;
    margin: 0;
}

.section-meta {
    font-size: 12px;
    color: var(--ae-muted);
}

/* Compact Page Layout */
.page-container {
    background: var(--ae-bg-secondary);
    min-height: 100vh;
    padding: 0;
}

.page-content {
    background: var(--ae-bg-primary);
    margin: var(--ae-spacing-sm);
    border: 1px solid var(--ae-border);
    border-radius: 6px;
    overflow: hidden;
}

/* Global logo optimization styles */
.ae-logo,
.ae-logo-large,
.ae-logo-medium,
.loading-logo {
    overflow: hidden;
    flex-shrink: 0;
}

.ae-logo img,
.ae-logo-large img,
.ae-logo-medium img,
.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Prevent logo container overflow */
.logo-container,
.welcome-logo,
.company-logo {
    overflow: hidden;
}

/* Ensure images load properly */
img[src*="logo.png"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: auto;
}

/* Fix any potential image stretching */
.ae-logo img,
.ae-logo-large img,
.ae-logo-medium img {
    aspect-ratio: auto;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        overflow: visible;
    }

    .brand-text,
    .nav-link span,
    .sidebar-footer,
    .user-details,
    .logout-btn {
        display: none;
    }

    .user-info {
        padding: 0.5rem;
        justify-content: center;
    }

    .sidebar-header {
        padding: 0.75rem 0.5rem;
    }

    .brand-logo {
        justify-content: center;
        gap: 0;
    }

    .sidebar .nav-link {
        justify-content: center;
        margin-right: 0.5rem;
        padding: 0.75rem;
    }

    .ae-logo {
        width: 32px;
        height: 32px;
        padding: 2px;
    }

    .ae-logo-large {
        width: 80px;
        height: 80px;
        padding: 10px;
        border-radius: 12px;
    }

    .ae-logo-medium {
        width: 40px;
        height: 40px;
        padding: 5px;
        border-radius: 8px;
    }

    .quick-access-card {
        margin-bottom: 1.5rem;
    }

    .card-ae {
        margin: 0.5rem;
        border-radius: 8px;
    }
    
    table.data-grid th,
    table.data-grid td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    /* Ensure logos don't overflow on small screens */
    .welcome-logo {
        margin-bottom: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header {
        padding: 0.5rem 0.25rem;
    }

    .ae-logo {
        width: 28px;
        height: 28px;
        padding: 1px;
        border-radius: 4px;
    }

    .ae-logo-large {
        width: 70px;
        height: 70px;
        padding: 8px;
        border-radius: 10px;
    }

    .ae-logo-medium {
        width: 36px;
        height: 36px;
        padding: 4px;
        border-radius: 6px;
    }

    .sidebar .nav-link {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        width: 100%;
        margin: 0;
        box-shadow: none;
    }
    
    .card-ae {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --ae-border: #000;
        --ae-text: #000;
    }
    
    .card-ae {
        border: 2px solid #000;
    }
    
    table.data-grid th,
    table.data-grid td {
        border: 1px solid #000;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Loading screen responsive styles */
@media (max-width: 768px) {
    .loading-logo {
        width: 60px !important;
        height: 60px !important;
        padding: 8px !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
    }

    .loading-text {
        font-size: 1.2rem !important;
    }

    .loading-subtext {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    .loading-spinner {
        width: 32px !important;
        height: 32px !important;
        border-width: 3px !important;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 50px !important;
        height: 50px !important;
        padding: 6px !important;
        border-radius: 10px !important;
    }

    .loading-text {
        font-size: 1rem !important;
    }

    .loading-subtext {
        font-size: 0.75rem !important;
    }
}
