* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6fa;
    --bg-tertiary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-tertiary: #95a5a6;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.15);
    --accent: #3498db;
    --accent-hover: #2980b9;
    --success: #27ae60;
    --warning: #e74c3c;
}

:root.dark-mode {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #808080;
    --border-color: #404040;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.7);
    --accent: #64b5f6;
    --accent-hover: #42a5f5;
    --success: #4caf50;
    --warning: #ff7043;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
    min-height: 100vh;
    gap: 0;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.control-panel {
    /* Removed - no longer used */
    display: none;
}

/* Top-Level Tab Navigation */
.main-tab-navigation {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    background: #34495e;
    border-bottom: 2px solid #2c3e50;
    padding: 0;
    position: relative;
}

.main-tab-button {
    flex: 1;
    padding: 15px 30px;
    background: #34495e;
    color: white;
    border: none;
    border-right: 1px solid #2c3e50;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-tab-button:last-child {
    border-right: none;
}

.main-tab-button:hover {
    background: #3d566e;
}

.main-tab-button.active {
    background: var(--accent);
    color: white;
}

.dark-mode-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: white;
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.main-content {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    background: var(--bg-secondary);
}

/* Base styles for all main views */
.main-view {
    display: none;
    flex: 1;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.main-view.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Specific layout for POI List View */
#poi-list-view.main-view {
    display: none;
    overflow-y: auto; /* Allow vertical scrolling */
}

#poi-list-view.main-view.active {
    display: flex;
}

#poi-list-view .sidebar {
    width: 100%;
    max-width: 800px;
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 0 auto;
    height: fit-content; /* Adjust height to content */
}

/* Map View styles */
#map-view.main-view {
    width: 100%;
    height: 100%;
}

#map-view.main-view.active {
    display: flex;
    flex-direction: column;
}

.map-view-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#map {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Graph View styles */
#graph-view.main-view.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Map coordinates display */
.map-coordinates {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
    pointer-events: none;
    z-index: 1000;
    min-width: 200px;
}

/* Heatmap controls */
.heatmap-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 250px;
    max-width: 300px;
}

.heatmap-toggle-container {
    margin-bottom: 10px;
}

.heatmap-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.heatmap-toggle-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.heatmap-player-filter {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.heatmap-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.player-filters {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.player-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.player-filter-item label {
    cursor: pointer;
    flex: 1;
    color: #34495e;
}

/* Heatmap gradient configuration */
.heatmap-gradient-config {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.gradient-preset-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 8px;
}

.gradient-preset-select:focus {
    outline: none;
    border-color: #3498db;
}

.custom-gradient-inputs {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gradient-color-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.gradient-color-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gradient-color-input label {
    font-size: 12px;
    color: #34495e;
    min-width: 60px;
}

.gradient-color-picker {
    width: 50px;
    height: 30px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    background: white;
}

.gradient-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.gradient-color-picker::-webkit-color-swatch {
    border: 1px solid #bdc3c7;
    border-radius: 3px;
}

.gradient-controls-buttons {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.gradient-btn-small {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.gradient-btn-small:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.gradient-btn-small:disabled {
    background: #ecf0f1;
    color: #95a5a6;
    cursor: not-allowed;
    border-color: #bdc3c7;
}

/* Heatmap radius and blur configuration */
.heatmap-radius-blur-config {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.radius-blur-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radius-blur-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radius-blur-input label {
    font-size: 12px;
    color: #34495e;
    min-width: 50px;
}

.radius-blur-number {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 12px;
}

.radius-blur-number:focus {
    outline: none;
    border-color: #3498db;
}

/* POI toggle (now in heatmap controls) */
.poi-toggle-container {
    margin-bottom: 10px;
}

.poi-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.poi-toggle-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Hide OpenLayers' built-in coordinate display if it exists */
.ol-mouse-position {
    display: none !important;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1000;
}

/* Graph View Container */
.graph-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #ecf0f1;
    overflow: hidden;
}

.graph-header {
    margin-bottom: 15px;
}

.graph-header h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.control-panel h2 {
    font-size: 18px;
    margin-right: 10px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-size: 14px;
    white-space: nowrap;
}

.control-group input {
    padding: 6px 10px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background: #34495e;
    color: white;
    font-size: 14px;
}

.control-group input[type="text"],
.control-group input[type="password"] {
    width: 200px;
}

.control-group input[type="number"] {
    width: 80px;
}

.control-group button {
    padding: 6px 15px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.control-group button:hover {
    background: #2980b9;
}

.control-group button:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}

.status {
    margin-left: auto;
    font-size: 12px;
    color: #bdc3c7;
}

.map-container {
    grid-column: 2;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.sidebar {
    flex: 1;
    background: #ecf0f1;
    overflow-y: auto;
    display: flex;
    padding: 20px;
    min-height: 500px;
    flex-direction: column;
}


.sidebar-section {
    padding: 15px;
    border-bottom: 1px solid #bdc3c7;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Search container */
.search-container {
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-input::placeholder {
    color: #95a5a6;
}

/* Category filter container */
.category-filter-container {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.category-filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.filter-btn-small {
    padding: 4px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn-small:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    user-select: none;
}

.category-filter-checkbox:hover {
    background: #f0f0f0;
    border-color: #3498db;
}

.category-filter-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.category-filter-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #3498db;
}

.category-filter-checkbox:has(input:checked) {
    background: #ebf5fb;
    border-color: #3498db;
}

/* Graph Container */
.graph-container {
    flex: 1;
    width: 100%;
    min-height: 400px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    background: white;
    position: relative;
}

.graph-controls {
    margin-bottom: 15px;
}

.graph-legend {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legend-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.legend-note {
    font-size: 11px;
    color: #7f8c8d;
    font-style: italic;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-header {
    margin-top: 20px;
    margin-bottom: 8px;
}

.category-header:first-child {
    margin-top: 0;
}

.category-header.hidden {
    display: none;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.category-count {
    font-size: 14px;
    font-weight: 400;
    color: #7f8c8d;
}

.category-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    align-items: start;
}

.category-group.hidden {
    display: none;
}

.inventory-item {
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.inventory-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.inventory-item.highlighted {
    border-color: #3498db;
    background: #ebf5fb;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.3);
}

.inventory-item.expiring {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.inventory-item.expiring .item-header {
    color: #e74c3c;
    font-weight: bold;
}

.item-header {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 15px;
}

.item-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Category badge colors */
.category-badge[data-category="Harbors"] {
    background: #e3f2fd;
    color: #1976d2;
}

.category-badge[data-category="Factories"] {
    background: #fff3e0;
    color: #e65100;
}

.category-badge[data-category="Food & Restaurants"] {
    background: #fce4ec;
    color: #c2185b;
}

.category-badge[data-category="Construction Sites"] {
    background: #f3e5f5;
    color: #7b1fa2;
}

.category-badge[data-category="Supermarkets & Stores"] {
    background: #e8f5e9;
    color: #388e3c;
}

.category-badge[data-category="Farms"] {
    background: #fff9c4;
    color: #f57f17;
}

.category-badge[data-category="Mines & Quarries"] {
    background: #efebe9;
    color: #5d4037;
}

.category-badge[data-category="Warehouses"] {
    background: #e0f2f1;
    color: #00796b;
}

.category-badge[data-category="Logging & Lumber"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.category-badge[data-category="Storage Facilities"] {
    background: #f1f8e9;
    color: #558b2f;
}

.category-badge[data-category="Drop Offs"] {
    background: #eceff1;
    color: #455a64;
}

.category-badge[data-category="Racing & Entertainment"] {
    background: #fce4ec;
    color: #ad1457;
}

.category-badge[data-category="Other"] {
    background: #fafafa;
    color: #616161;
}

.item-detail {
    font-size: 13px;
    color: #7f8c8d;
    margin: 3px 0;
}

.item-detail strong {
    color: #34495e;
}

.inventory-item.expiring .item-detail {
    color: #c0392b;
}

/* OpenLayers marker styling */
.ol-viewport {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Highlighted marker styling */
.ol-feature.highlighted-marker {
    filter: hue-rotate(200deg) brightness(1.2);
    z-index: 1000 !important;
}

/* Mouse position display */
.custom-mouse-position {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    pointer-events: none;
    z-index: 100;
}

.popup-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.popup-section {
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.popup-section-title {
    font-weight: 600;
    font-size: 13px;
    color: #34495e;
    margin-bottom: 4px;
}

.popup-detail {
    font-size: 12px;
    color: #7f8c8d;
    margin: 2px 0;
}

/* Error message styling */
.error-message {
    padding: 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    text-align: center;
    font-size: 14px;
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #dfe6e9;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #95a5a6;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}

/* Inventory item improvements */
.inventory-item {
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.inventory-item.hidden {
    display: none;
}

.inventory-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 30px;
}

.inventory-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.inventory-tag.input {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.inventory-tag.output {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.inventory-tag .tag-label {
    margin-right: 4px;
    font-weight: 600;
}

/* Delivery Overlay */
.delivery-overlay {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.delivery-overlay.open {
    right: 0;
}

.delivery-overlay-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.delivery-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #bdc3c7;
    background: #f8f9fa;
}

.delivery-overlay-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.close-button {
    background: none;
    border: none;
    font-size: 32px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover {
    color: #2c3e50;
}

.delivery-overlay-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.delivery-aggregate-section {
    margin-bottom: 25px;
}

.delivery-aggregate-section h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.aggregate-group {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.aggregate-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.aggregate-group-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.aggregate-group-stats {
    font-size: 12px;
    color: #7f8c8d;
}

.delivery-list {
    margin-top: 8px;
}

.delivery-item {
    background: white;
    border-left: 3px solid #3498db;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 12px;
}

.delivery-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.delivery-item-id {
    font-weight: 600;
    color: #2c3e50;
}

.delivery-item-payment {
    color: #27ae60;
    font-weight: 600;
}

.delivery-item-details {
    color: #7f8c8d;
    font-size: 11px;
}

/* Overlay backdrop */
.delivery-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.delivery-overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Housing View Styles */
#housing-view.main-view {
    display: none;
    overflow-y: auto;
}

#housing-view.main-view.active {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Odometer View Styles */
#odometer-view.main-view {
    display: none;
    overflow-y: auto;
}

#odometer-view.main-view.active {
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: flex-start;
}

.housing-view-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.housing-controls {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.housing-filter-container {
    display: flex;
    align-items: center;
}

.housing-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
    user-select: none;
}

.housing-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.housing-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.housing-owner-group {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.housing-owner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.owner-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.status-indicator {
    font-size: 16px;
    font-weight: bold;
}

.status-indicator.online {
    color: #27ae60;
}

.status-indicator.offline {
    color: #95a5a6;
}

.owner-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.owner-id {
    font-size: 12px;
    color: #7f8c8d;
    font-family: monospace;
}

.house-count {
    font-size: 14px;
    color: #34495e;
    font-weight: 500;
}

.housing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.housing-card {
    background: #f8f9fa;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s;
    cursor: default;
}

.housing-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.housing-card-header {
    margin-bottom: 12px;
}

.housing-card-id {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    font-family: monospace;
    word-break: break-all;
}

.housing-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.housing-card-owner,
.housing-card-expire {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.housing-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
    font-weight: 600;
}

.housing-value {
    font-size: 14px;
    color: #2c3e50;
    word-break: break-word;
}

.housing-card-expire.expiring-soon .housing-value {
    color: #e74c3c;
    font-weight: 600;
}

.housing-card-expire.expiring-medium .housing-value {
    color: #f39c12;
    font-weight: 500;
}

.housing-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Odometer View Styles */
.odometer-view-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
}

.odometer-header {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.odometer-header h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 24px;
}

.odometer-aggregate {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.aggregate-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.aggregate-stat .stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aggregate-stat .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #3498db;
}

.odometer-controls {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.odometer-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.odometer-player-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.odometer-player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.odometer-player-left {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    justify-content: flex-start;
}

.odometer-player-right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: auto;
    justify-content: flex-start;
}

.odometer-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.odometer-player-header .player-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.odometer-player-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.odometer-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.odometer-stat .stat-label {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.odometer-stat .stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.odometer-stat .stat-value.speed-value {
    color: #27ae60;
}

.odometer-vehicles {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.vehicles-header {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicles-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.vehicles-table thead {
    background: #f8f9fa;
}

.vehicles-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ecf0f1;
    cursor: pointer;
    user-select: none;
}

.vehicles-table th.sortable:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.vehicles-table th.text-right {
    text-align: right;
}

.vehicles-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

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

.vehicles-table tbody tr:hover {
    background: #f8f9fa;
}

.vehicles-table td {
    padding: 10px 12px;
    font-size: 14px;
}

.vehicles-table .vehicle-name {
    color: #2c3e50;
    font-weight: 500;
}

.vehicles-table .vehicle-distance {
    color: #3498db;
    font-weight: 600;
    text-align: right;
}

.vehicles-table .vehicle-speed {
    color: #27ae60;
    font-weight: 600;
    text-align: right;
}

