:root {
    --bg-dark: #121212;
    --bg-surface: #1e1e1e;
    --bg-elevated: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #6c9fff;
    --accent-secondary: #4a6fc0;
    --border-color: #3d3d3d;
    --hover-color: #383838;
    --selected-color: #3a4a6c;
}

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: var(--bg-dark); 
    color: var(--text-primary); 
    margin: 0;
    padding: 0;
}

/* Header with constellation background */
.app-header {
    background-image: url('constellation_background.png');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 40px 20px;
    text-align: center;
}

.app-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 24, 0.7); /* Dark overlay */
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
}

h1 { 
    color: var(--text-primary);
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

h2 {
    color: var(--accent-primary);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
}

h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: 500;
}

/* Main content area */
.main-content {
    padding: 20px;
}

/* Tab Navigation */
.tabs { 
    margin: 0;
    padding: 0 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    display: flex;
}

.tab-btn { 
    margin: 0 4px 0 0; 
    padding: 12px 20px; 
    font-size: 1rem; 
    border: none;
    background: transparent; 
    color: var(--text-secondary); 
    cursor: pointer; 
    outline: none;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.tab-btn.active { 
    background: var(--bg-dark); 
    color: var(--accent-primary);
    font-weight: 500;
    border-bottom: 2px solid var(--accent-primary);
}

/* User menu */
.user-menu {
    margin-left: auto;
    position: relative;
    z-index: 10000;
}

.user-menu-button {
    margin: 0;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu-button:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.user-menu-button i {
    font-size: 0.8em;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-item {
    padding: 12px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

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

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

.user-dropdown-item.logout:hover {
    background-color: #d32f2f;
    color: white;
}

.app-version {
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-style: italic;
}

.logout-btn {
    margin-left: auto;
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #d32f2f;
    color: white;
}

.tab-content { 
    display: none; 
    background: var(--bg-dark); 
    padding: 20px; 
    min-height: calc(100vh - 200px);
}

.tab-content.active { 
    display: block; 
}

/* Split View Layout */
.split-view { 
    display: flex; 
    gap: 25px;
    height: calc(100vh - 220px);
    min-height: 500px;
}

.table-list-panel { 
    width: 280px; 
    min-width: 200px;
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
    overflow-y: auto;
}

.table-details-panel { 
    flex: 1; 
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

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

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9rem;
    background: var(--bg-surface);
}

.data-table th, 
.data-table td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
}

.data-table th {
    background: var(--bg-elevated);
    color: var(--accent-primary);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tr:hover {
    background: var(--hover-color);
}

.data-table tr.selected {
    background: var(--selected-color);
}

/* Schema Display */
.schema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.record-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.record-count span {
    font-weight: 500;
    color: var(--accent-primary);
}

.schema-table th {
    background: var(--bg-elevated);
}

/* Data Preview */
.preview-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.preview-button {
    padding: 10px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.preview-button:hover {
    background: var(--accent-secondary);
}

.preview-limit {
    padding: 9px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.data-grid-container {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.data-grid {
    margin-bottom: 0;
}

.null-value {
    color: #666;
    font-style: italic;
}

/* Status Messages */
.loading {
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

.placeholder {
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.error-message {
    padding: 15px;
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border-radius: 4px;
    margin-bottom: 15px;
}

.info-message {
    padding: 15px;
    background: rgba(0, 123, 255, 0.2);
    color: #6ba6ff;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Dark mode scrollbar styling */
/* For Webkit browsers (Chrome, Safari, newer Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
    border: 2px solid var(--bg-elevated);
}

::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

::-webkit-scrollbar-corner {
    background: var(--bg-elevated);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a var(--bg-elevated);
}

/* Additional styling for data grid scrollable containers */
.data-grid-container.scrollable {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    padding-bottom: 10px;
}

/* Make sure table headers stay fixed when scrolling horizontally */
.data-grid th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-elevated);
}

/* Report Builder Styles */

/* Generic select dropdown styling for dark theme */
select {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border 0.2s;
}
select:hover {
    border-color: var(--accent-primary);
}
select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Date picker input styling */
.date-picker,
.flatpickr-input {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9rem;
}
.date-picker:focus,
.flatpickr-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Layout fixes for report viewer */
.report-viewer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.report-results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}
.report-results {
    flex: 1;
    display: flex;
}
.canned-report-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Canned report filter bar */
.report-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}
.report-filters .filter-item,
.report-filters .filter-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.report-filters .filter-item-right {
    margin-left: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.action-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.action-button:hover {
    background: var(--accent-secondary);
}

.action-button .icon {
    margin-right: 5px;
    font-weight: bold;
}

.primary-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-button:hover {
    background: var(--accent-secondary);
}

.secondary-button {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-button:hover {
    background: var(--hover-color);
}

.small-button {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.small-button:hover {
    background: var(--hover-color);
}

/* Chart download button */
.chart-download-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(40, 40, 40, 0.8);
    border: none;
    border-radius: 4px;
    color: #b0b0b0;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.chart-download-btn:hover {
    background: rgba(60, 60, 60, 0.9);
    color: #ffffff;
}

/* Report List */
#reports-list {
    margin-bottom: 20px;
}

.report-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.report-item:hover {
    background: var(--hover-color);
}

.report-item.selected {
    background: var(--selected-color);
    border-color: var(--accent-primary);
}

/* Graph List */
#graphs-list {
    margin-bottom: 20px;
}

.selection-box {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.selection-box:hover {
    background: var(--hover-color);
}

.selection-box.selected {
    background: var(--selected-color);
    border-color: var(--accent-primary);
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.list-item-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.list-item-actions {
    display: flex;
    align-items: center;
}

.icon-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.icon-button:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.delete-graph-btn .icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.report-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.report-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.report-item-source {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-elevated);
}

.report-item-source.netsuite {
    background: rgba(106, 90, 205, 0.2);
    color: #a29bfe;
}

.report-item-source.postgres {
    background: rgba(72, 126, 176, 0.2);
    color: #74b9ff;
}

.report-item-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.report-item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Report Form */
.report-form {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

.form-section {
    margin: 25px 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 15px;
    color: var(--accent-primary);
}

/* Tables & Joins */
.tables-container {
    margin-bottom: 15px;
}

.tables-selection {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tables-selection label {
    min-width: 120px;
}

.tables-selection select {
    flex: 1;
}

.selected-tables {
    margin: 15px 0;
}

.selected-table-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.selected-table-name {
    font-weight: 500;
}

.selected-table-alias {
    color: var(--accent-primary);
    font-style: italic;
    margin-left: 8px;
}

.join-builder {
    margin-top: 15px;
    padding: 10px;
    background-color: #1e2130;
    border-radius: 5px;
    border: 1px solid #2d3748;
}

.join-builder h4 {
    margin-top: 0;
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 10px;
}

.join-conditions {
    margin-bottom: 10px;
    min-height: 30px;
}

.join-item {
    background-color: #2d3748;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.join-text {
    color: #a0aec0;
    font-size: 13px;
    flex: 1;
}

.join-form {
    background-color: #2d3748;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}

.join-row {
    display: flex;
    margin-bottom: 8px;
    gap: 8px;
}

.join-row select {
    flex: 1;
}

.join-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

#new-join-btn {
    margin-top: 5px;
}

/* Columns */
.columns-container {
    display: flex;
    gap: 20px;
}

.available-columns {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.column-group {
    margin-bottom: 10px;
}

.column-group-header {
    padding: 8px 12px;
    background: var(--bg-elevated);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.column-item {
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-item:hover {
    background: var(--hover-color);
}

.column-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.selected-columns {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.columns-header {
    padding: 8px 12px;
    background: var(--bg-elevated);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.selected-columns-list {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.selected-column-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d3748;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    cursor: grab;
    border-left: 3px solid #4299e1;
}

.selected-column-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    border-left: 3px solid #f56565;
}

.selected-column-item.drag-over {
    border-top: 2px solid #4299e1;
    padding-top: 6px;
}

.selected-column-item:hover {
    background-color: #3a4a63;
}

.selected-column-name {
    color: #a0aec0;
    font-size: 13px;
}

.column-actions {
    display: flex;
    gap: 5px;
}

.column-handle {
    cursor: grab;
    color: #718096;
    padding: 0 5px;
}

.column-handle:hover {
    color: #a0aec0;
}

.selected-columns-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #2d3748;
}

.selected-columns-header h4 {
    margin: 0;
    color: #a0aec0;
    font-size: 14px;
}

.column-order-hint {
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

/* Filters */
.filters-container {
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.active-filters {
    margin-top: 15px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.filter-item-text {
    flex: 1;
}

.filter-field {
    font-weight: 500;
}

.filter-operator {
    color: var(--accent-primary);
    margin: 0 5px;
}

.filter-value {
    font-style: italic;
}

/* Grouping & Aggregation */
.grouping-container {
    margin-bottom: 15px;
}

.grouping-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.group-by-section,
.aggregation-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.active-grouping {
    margin-top: 15px;
}

.grouping-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.grouping-text {
    flex: 1;
}

.aggregate-function {
    color: var(--accent-primary);
    font-weight: 500;
}

/* SQL Editor */
.sql-container {
    margin-bottom: 15px;
}

.sql-editor {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #a5d8ff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 10px;
}

.sql-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Report Navigation */
.report-category {
    margin-bottom: 15px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-header:hover {
    background: var(--hover-color);
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-toggle {
    color: var(--accent-primary);
    font-size: 12px;
}

.category-reports {
    padding: 5px 0 5px 15px;
    border-left: 2px solid var(--border-color);
    margin-left: 10px;
}

.report-item {
    padding: 10px 12px;
    margin: 8px 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.report-item:hover {
    background: var(--hover-color);
}

.report-item.selected {
    background: var(--selected-color);
    border-color: var(--accent-primary);
}

.report-item.placeholder-report {
    opacity: 0.7;
}

.report-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.report-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.report-item-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Report Viewer */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-filters-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.report-filter-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
}

.filter-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.85rem;
}

.filter-controls {
    display: flex;
    gap: 8px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.report-results-container {
    min-height: 300px;
}

.report-results {
    overflow: auto;
}

.report-summary {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.report-count {
    font-weight: 500;
    color: var(--accent-primary);
}

/* Dashboard styles */
.access-title-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2em;
    color: #b0b0b0;
}

.dashboard-container {
    padding: 20px;
}

.dashboard-container h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Regional Sales Section */
.access-title {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 15px 0 5px;
    padding: 0 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.debug-info {
    text-align: left;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 15px;
    padding: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #666;
}

.regional-banner {
    background-color: #1a1a1a;
    color: #fff;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 20px;
}

.regional-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.regional-box {
    background-color: #1a1a1a;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.regional-box h3 {
    color: #fff;
    font-size: 0.9em;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.regional-box .sales-amount {
    color: #6c9fff;
    font-size: 1.2em;
    font-weight: 500;
}

.chart-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    color: var(--text-secondary);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 300px;
}

.dashboard-placeholder {
    background: var(--bg-elevated);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* KPI Card Styles */
.kpi-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.kpi-title {
    color: var(--text-secondary);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    color: var(--text-primary);
    font-size: 1.8em;
    font-weight: 500;
}

.kpi-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
}

.kpi-change.positive {
    color: #4caf50;
}

.kpi-change.negative {
    color: #f44336;
}

.kpi-change.neutral {
    color: var(--text-secondary);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
}

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

.kpi-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

/* Bottom Charts Section */
.bottom-charts-section {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.chart-card.half-width {
    width: calc(50% - 10px);
    min-height: 350px;
}
