/* Professional Black & Metallic Gold Theme - ShipScout Portal */

/* CSS Variables for Professional Design System */
:root {
    /* Bright Vibrant Teal Colors - High Contrast */
    --color-gold-metallic: #00CFC1;
    --color-gold-shine: #00E5D6;
    --color-gold-bright: #00CFC1;
    --color-gold-dark: #00A89D;
    --color-gold-muted: #00B8AA;

    /* Deep Black Backgrounds */
    --color-black-deepest: #000000;
    --color-black-primary: #0D0D0D;
    --color-black-secondary: #1A1A1A;
    --color-black-elevated: #1F1F1F;
    --color-black-panel: #141414;

    /* Professional Gray Scale */
    --color-gray-950: #0A0A0A;
    --color-gray-900: #121212;
    --color-gray-850: #181818;
    --color-gray-800: #1E1E1E;
    --color-gray-750: #242424;
    --color-gray-700: #2A2A2A;
    --color-gray-600: #383838;
    --color-gray-500: #6B6B6B;
    --color-gray-400: #8E8E8E;
    --color-gray-300: #B0B0B0;
    --color-gray-200: #CCCCCC;
    --color-gray-100: #E5E5E5;

    /* Semantic Colors */
    --color-success: #22C55E;
    --color-success-bg: rgba(34, 197, 94, 0.08);
    --color-warning: #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.08);
    --color-danger: #EF4444;
    --color-danger-bg: rgba(239, 68, 68, 0.08);
    --color-info: #00CFC1;
    --color-info-bg: rgba(0, 207, 193, 0.08);

    /* Background Colors */
    --bg-body: #0D0D0D;
    --bg-primary: #141414;
    --bg-secondary: #1A1A1A;
    --bg-elevated: #1F1F1F;
    --bg-panel: #141414;
    --bg-card: #181818;
    --bg-input: #1A1A1A;
    --bg-overlay: rgba(0, 0, 0, 0.97);

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #6B6B6B;
    --text-gold: #00CFC1;
    --text-gold-bright: #00E5D6;

    /* Border & Dividers */
    --border-gold: 1px solid #00CFC1;
    --border-gold-thick: 2px solid #00CFC1;
    --border-gold-shine: 1px solid #00E5D6;
    --border-subtle: 1px solid #2A2A2A;
    --border-medium: 1px solid #383838;

    /* Shadows with Gold Glow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.8);
    --shadow-gold: 0 0 20px rgba(0, 207, 193, 0.35);
    --shadow-gold-lg: 0 0 40px rgba(0, 207, 193, 0.45);
    --shadow-gold-glow: 0 0 30px rgba(0, 229, 214, 0.5);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen', 'Ubuntu', 'Helvetica Neue', sans-serif;
    background: var(--bg-body);
    background-image:
        /* Flowing light blue wave stripes - more visible */
        linear-gradient(135deg, transparent 0%, transparent 35%, rgba(14, 165, 233, 0.1) 35%, rgba(56, 189, 248, 0.15) 50%, rgba(14, 165, 233, 0.1) 65%, transparent 65%, transparent 100%),
        linear-gradient(-45deg, transparent 0%, transparent 25%, rgba(14, 165, 233, 0.08) 25%, rgba(56, 189, 248, 0.12) 40%, rgba(14, 165, 233, 0.08) 55%, transparent 55%, transparent 100%),
        /* Radial light blue glow accents - more pronounced */
        radial-gradient(ellipse at 10% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        /* Subtle diagonal lines for texture */
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(14, 165, 233, 0.03) 40px, rgba(14, 165, 233, 0.03) 80px);
    background-size: 200% 200%, 200% 200%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    background-position: 0% 50%, 100% 50%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    transition: background-position 0.3s ease-out;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: background-position;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* Header */
.app-header {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    margin-bottom: var(--space-xl);
    background: var(--glass-background);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    position: relative;
}

.app-header h1,
.app-header .subtitle {
    position: relative;
}

.app-header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-gold-metallic);
    text-shadow: 0 0 30px rgba(201, 169, 97, 0.5);
    letter-spacing: -0.5px;
}

.app-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Card Component with Glass Morphism */
.card {
    background: var(--glass-background);
    border-radius: var(--glass-border-radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.card-title {
    font-size: 1.5rem;
    color: var(--text-gold);
    margin-bottom: var(--space-sm);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
    line-height: 1.5;
}

/* Search Section */
.search-section {
    margin-bottom: var(--space-xl);
}

.search-controls {
    background: var(--glass-background);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--space-xl);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-controls:hover {
    background: var(--glass-background-hover);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-gold);
    margin-bottom: var(--space-sm);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-control:hover {
    border-color: var(--color-gray-600);
    background: var(--bg-elevated);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold-metallic);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(0, 207, 193, 0.15), var(--shadow-gold);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Select Dropdown */
select.form-control {
    cursor: pointer;
    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='%23C9A961' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

/* Time Range Buttons */
.time-options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.time-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: linear-gradient(135deg, #152238 0%, #1a2844 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.5px;
}

.time-btn:hover {
    border-color: var(--color-gold-metallic);
    color: var(--text-gold);
    background: var(--bg-elevated);
}

.time-btn.active {
    color: var(--color-black-primary);
    background: var(--color-gold-metallic);
    border-color: var(--color-gold-metallic);
    box-shadow: var(--shadow-gold);
}

/* Search Type Tabs */
.search-type-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.search-type-tab {
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: linear-gradient(135deg, #152238 0%, #1a2844 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.5px;
    flex: 1;
}

.search-type-tab:hover {
    border-color: var(--color-gold-metallic);
    color: var(--text-gold);
    background: var(--bg-elevated);
}

.search-type-tab.active {
    color: var(--color-black-primary);
    background: var(--color-gold-metallic);
    border-color: var(--color-gold-metallic);
    box-shadow: var(--shadow-gold);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Selected Companies Container */
.selected-companies-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 0;
}

.company-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--color-gold-metallic);
    border-radius: var(--radius-md);
    color: var(--text-gold);
    font-size: 0.875rem;
    font-weight: 500;
}

.company-chip-name {
    color: var(--text-gold);
}

.company-chip-country {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 4px;
}

.company-chip-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 4px;
    transition: color var(--transition-base);
}

.company-chip-remove:hover {
    color: #ff4444;
}

/* Company Autocomplete Checkbox */
.company-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.company-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #00CFC1;
    border-radius: 3px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.company-checkbox.checked {
    background: #00CFC1;
}

.company-checkbox.checked::after {
    content: '✓';
    color: #0D0D0D;
    font-size: 14px;
    font-weight: bold;
}

.company-info {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    color: var(--color-black-primary);
    background: var(--color-gold-metallic);
    border: 2px solid var(--color-gold-metallic);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    background: var(--color-gold-shine);
    border-color: var(--color-gold-shine);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    color: var(--text-gold);
    background: var(--bg-input);
    border: none;
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--color-gold-shine);
    color: var(--text-gold-bright);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-success {
    color: white;
    background: var(--color-success);
    border: 2px solid var(--color-success);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* Dashboard Toggle Buttons */
.dashboard-toggle-btn {
    background: var(--color-gold-metallic);
    color: var(--color-black-primary);
    border: 2px solid var(--color-gold-metallic);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: var(--space-md);
}

.dashboard-toggle-btn:hover {
    background: var(--color-gold-shine);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-lg);
}

/* View Toggle Tabs */
.view-toggle-tabs {
    display: flex;
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: 6px;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.view-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-size: 0.95rem;
}

.view-tab:hover {
    color: var(--text-gold);
}

.view-tab.active {
    background: var(--color-gold-metallic);
    color: var(--color-black-primary);
    box-shadow: var(--shadow-gold);
}

/* Results Table - Optimized for Performance */
.results-table {
    width: 100%;
    background: #0A0F1B;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.15);
    overflow: hidden;
    /* Performance optimizations */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    contain: layout style paint;
    content-visibility: auto;
}

.results-table thead {
    background: #0D1929;
    border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

.results-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 2px solid var(--color-gold-metallic);
}

.results-table td {
    padding: 8px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(14, 165, 233, 0.08);
    font-size: 0.95rem;
}

.results-table tbody tr {
    background: #111A2D;
    contain: layout style;
    /* No transitions on rows - instant background change for better performance */
}

.results-table tbody tr:nth-child(even) {
    background: #0F1726;
}

.results-table tbody tr:hover {
    background: #182540;
}

.results-table td {
    contain: layout style paint;
}

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

/* Dashboard Section */
.dashboard-section {
    margin-top: var(--space-2xl);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--glass-background);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    position: relative;
}

.dashboard-title {
    font-size: 2rem;
    color: var(--text-gold);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.metric-card {
    background: var(--glass-background);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.metric-card:hover {
    transform: translateY(-4px);
    background: var(--glass-background-hover);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-gold);
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-change.positive {
    color: var(--color-success);
}

.metric-change.negative {
    color: var(--color-danger);
}

/* Charts Grid */
.charts-grid,
.volza-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.chart-card,
.volza-chart-card {
    background: var(--glass-background) !important;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.chart-card:hover,
.volza-chart-card:hover {
    background: var(--glass-background-hover) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.volza-chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3,
.volza-chart-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-gold);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.5px;
}

.volza-chart-card canvas,
.chart-card canvas {
    background: transparent !important;
    border-radius: 4px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-gold);
}

.chart-container {
    position: relative;
    height: 350px;
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-gray-700);
    border-top: 4px solid var(--color-gold-metallic);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    margin-top: var(--space-md);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Status Messages */
.status-message {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-left: 4px solid;
    background: var(--bg-panel);
}

.status-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: var(--color-success);
}

.status-error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.status-info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border-color: var(--color-info);
}

.status-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border-color: var(--color-warning);
}

/* Expand Icon */
.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-input);
    border: var(--border-subtle);
    color: var(--text-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
}

.expand-icon:hover {
    background: var(--color-gold-metallic);
    color: var(--color-black-primary);
    border-color: var(--color-gold-metallic);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.expand-icon.expanded:hover {
    transform: rotate(180deg) scale(1.1);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: var(--bg-panel);
    border: var(--border-gold-thick);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl), var(--shadow-gold-glow);
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    color: var(--text-gold);
    margin-bottom: var(--space-lg);
    text-align: center;
    font-size: 1.75rem;
}

/* Detail Row */
.detail-row {
    background: var(--bg-panel);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-sm);
}

.detail-row strong {
    color: var(--text-gold);
}

.detail-row p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* Expand Button */
.expand-btn {
    background: var(--bg-input);
    border: var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.expand-btn:hover {
    background: var(--color-gold-metallic);
    color: var(--color-black-primary);
    border-color: var(--color-gold-metallic);
    box-shadow: var(--shadow-gold);
}

/* Integrated Dashboard */
.integrated-dashboard {
    margin-top: var(--space-xl);
    animation: fadeIn 0.5s ease;
    background: var(--glass-background) !important;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: var(--space-xl);
}

#analyticsContent {
    background: transparent !important;
}

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

/* Chart Animations */
.chart-animate {
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

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

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

.badge-gold {
    background: var(--color-gold-metallic);
    color: var(--color-black-primary);
    box-shadow: var(--shadow-gold);
}

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

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

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-600);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-input);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-metallic);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid,
    .volza-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header h1 {
        font-size: 2rem;
    }

    .container {
        padding: var(--space-md);
    }

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

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .time-options {
        flex-direction: column;
    }

    .time-btn {
        width: 100%;
    }
}

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

.text-gold {
    color: var(--text-gold);
}

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

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

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

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

/* Circular Text Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.circular-text-container {
    position: relative;
    width: 250px;
    height: 250px;
}

.circular-text {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 8s linear infinite;
}

.circular-text text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 24px;
    font-weight: 600;
    fill: var(--color-gold-shine);
    letter-spacing: 8px;
    text-transform: uppercase;
}

/* Helix Loader - Simple Centering */
.loading-center-icon,
.helix-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Circular text rotation animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 40px rgba(245, 197, 67, 0.6),
                    0 0 80px rgba(245, 197, 67, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 60px rgba(245, 197, 67, 0.8),
                    0 0 120px rgba(245, 197, 67, 0.6);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .btn,
    .form-actions {
        display: none;
    }
}


/* ============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================ */

/* Tablet and Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .search-content {
        gap: 15px;
    }

    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 15px;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    /* Base Typography */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    /* Container */
    .container {
        padding: 10px;
        max-width: 100%;
    }

    /* Header */
    .header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo-container {
        order: 1;
        flex: 1 1 auto;
    }

    .header-logo {
        font-size: 18px;
    }

    .user-bar {
        order: 2;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0;
        border-top: 1px solid rgba(245, 197, 67, 0.2);
    }

    .user-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    #currentUsername {
        font-size: 14px;
    }

    #sessionInfo {
        font-size: 12px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 44px;
    }

    /* Hero Section */
    .hero {
        padding: 20px 15px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    /* Workspace Section */
    .workspace-section {
        padding: 15px;
        margin: 15px 0;
    }

    .workspace-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .workspace-title {
        font-size: 20px;
    }

    .workspace-controls {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .workspace-controls .btn {
        width: 100%;
        justify-content: center;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Search Section */
    .search-section {
        padding: 15px;
        margin: 15px 0;
    }

    .search-header {
        font-size: 20px;
    }

    .search-type-selector {
        flex-direction: column;
        gap: 8px;
    }

    .search-type-btn {
        width: 100%;
        padding: 10px 15px;
        min-height: 44px;
    }

    .time-range-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .time-button {
        padding: 10px;
        font-size: 13px;
        min-height: 44px;
    }

    .form-group label {
        font-size: 13px;
    }

.form-control,
.form-select {
    padding: 10px 12px;
    font-size: 14px;
    min-height: 44px;
}

.country-autocomplete {
    position: relative;
}

.country-autocomplete .form-control {
    padding-right: 40px;
}

.country-clear-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #b0b0b0;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: none;
}

.country-clear-btn:hover {
    color: #f5c543;
}

.country-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #141414;
    border: 1px solid #00CFC1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 20px rgba(201, 169, 97, 0.25);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    color: #B0B0B0;
}

.country-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 13px;
    color: #B0B0B0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.country-suggestion:hover,
.country-suggestion.active {
    background: #00CFC1;
    color: #0D0D0D;
}

.country-suggestion small {
    color: #7f7f7f;
    font-size: 11px;
}

.country-suggestion:hover small,
.country-suggestion.active small {
    color: #0D0D0D;
    opacity: 0.7;
}

.input-hint {
    display: block;
    margin-top: 6px;
    color: #7f7f7f;
    font-size: 12px;
}

.search-buttons {
    flex-direction: column;
    gap: 10px;
}

    .search-buttons .btn {
        width: 100%;
    }

    /* Autocomplete Dropdown */
    .autocomplete-dropdown {
        max-height: 200px;
        font-size: 13px;
    }

    .autocomplete-item {
        padding: 10px 12px;
    }

    /* Results Section */
    .results-section {
        padding: 15px;
        margin: 15px 0;
    }

    .results-tabs {
        gap: 8px;
    }

    .results-tab {
        padding: 10px 15px;
        font-size: 14px;
        min-height: 44px;
    }

    .results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .results-title {
        font-size: 20px;
    }

    .workspace-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* Search Content - Vertical Stack on Mobile */
    .search-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    /* CRITICAL: Override inline display:flex on parent container */
    #searchResults > div[style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* CRITICAL: Hide vertical KEYWORDS/FILTERS tabs on mobile */
    .vertical-panel-tab,
    #keywordsCollapsedHeader,
    #filtersCollapsedHeader {
        display: none !important;
    }

    /* Show and reposition the actual panels to top on mobile - FULL WIDTH */
    /* NOTE: It's #filterPanel (singular), not #filtersPanel */
    #relatedKeywordsPanel,
    #filterPanel {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
    }

    /* Override sticky positioning on inner divs */
    #relatedKeywordsPanel > div,
    #filterPanel > div {
        position: static !important;
    }

    /* Force panel contents to be visible and full width on mobile */
    #relatedKeywordsContent,
    #keywordsHeader,
    #filtersHeader,
    #filtersContent,
    #volzaFiltersContainer {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure filter categories don't get cut off */
    .filter-category,
    .filter-category-header {
        width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* Make filter panels collapsible cards at top */
    .filters-panel-content {
        width: 100% !important;
        position: static !important;
        transform: none !important;
    }

    /* Keywords Section - Compact horizontal at top */
    .keywords-section {
        order: 1;
        width: 100%;
        margin-bottom: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        padding: 10px;
    }

    .keywords-section h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .related-keywords {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .keyword-tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Filters Panel Content - Compact horizontal at top */
    .filters-panel-content {
        order: 2;
        width: 100%;
        max-width: none;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin-bottom: 10px;
        max-height: 300px;
        overflow-y: auto;
    }

    /* Results Panel - Full Width, Priority Display */
    .results-panel {
        order: 3;
        width: 100%;
        margin: 0;
        flex: 1;
    }

    /* CRITICAL FIX: Make table container horizontally scrollable */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 auto;
        padding: 0;
    }

    /* Data Table */
    .data-table {
        min-width: 800px;
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .data-table th {
        white-space: nowrap;
    }

    /* Table Actions */
    .row-actions {
        gap: 5px;
    }

    .row-actions .btn {
        padding: 5px 10px;
        font-size: 11px;
        min-height: 32px;
    }

    /* Pagination */
    .pagination-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .pagination-info {
        font-size: 12px;
        text-align: center;
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .pagination-buttons .btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }

    .page-input {
        width: 60px;
        padding: 6px 8px;
        font-size: 12px;
    }

    /* Filters */
    .filter-category {
        margin-bottom: 12px;
    }

    .filter-category-header {
        padding: 10px 12px;
        font-size: 13px;
    }

    .filter-content {
        padding: 10px;
    }

    .filter-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    .filter-search {
        padding: 8px 10px;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .filter-actions {
        flex-direction: column;
        gap: 8px;
    }

    .filter-actions .btn {
        width: 100%;
    }

    /* Analytics Dashboard */
    .analytics-section {
        padding: 15px;
        margin: 15px 0;
    }

    .analytics-title {
        font-size: 20px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .chart-container {
        height: 250px;
    }

    /* Cards */
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 16px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px auto;
        padding: 20px;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Alert */
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* Loading Overlay */
    .loading-overlay {
        backdrop-filter: blur(8px);
    }

    .circular-text-container {
        width: 200px;
        height: 200px;
    }

    .circular-text {
        width: 180px;
        height: 180px;
    }

    .circular-text text {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .loading-center-icon {
        --uib-size: 60px;
    }

    /* Utility Classes */
    .d-mobile-none {
        display: none !important;
    }

    .d-mobile-block {
        display: block !important;
    }
}

/* Extra Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    .container {
        padding: 8px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .time-range-buttons {
        grid-template-columns: 1fr;
    }

    .btn {
        font-size: 12px;
        padding: 8px 14px;
    }

    .data-table {
        min-width: 600px;
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .chart-container {
        height: 220px;
    }

    .pagination-buttons .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 8px 15px;
    }

    .hero {
        padding: 15px;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Touch Target Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .search-type-btn,
    .time-button,
    .results-tab,
    .pagination-buttons .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .filter-item label {
        min-height: 44px;
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .data-table th {
        min-height: 44px;
    }
}

/* Hide Mobile UI Elements on Desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    .mobile-filter-drawer {
        display: none !important;
    }
}

/* Additional comprehensive hiding of all mobile drawer children */
@media (min-width: 769px) {
    #mobileFilterDrawer,
    .drawer-header,
    .drawer-footer,
    .drawer-content,
    #mobileFiltersContent,
    #mobileKeywordsContent,
    .btn-apply,
    .btn-clear {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Company Link Styles - clickable company names in search results */
.company-link {
    color: #00CFC1;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.company-link:hover {
    color: #00e6d6;
    text-decoration: underline;
}
