/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #6c757d;
    --border-color: #e9ecef;
    --input-border-color: #ced4da;
    --success-color: #28a745;
    --blue-color: #007bff;
    --background-light: #f8f9fa;
    --text-muted: #adb5bd;
}

/* Base styles */
body { 
    font-family: Arial; 
    padding: 20px;
    margin: 0;
}

/* Main layout */
.main-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
    margin-top: 20px;
    position: relative;
}

/* Sidebar styles */
.sidebar {
    width: 300px;
    min-width: 300px;
    transition: width 0.3s ease;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 50px;
    min-width: 50px;
}

.sidebar.collapsed .filter-content {
    display: none;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 20px;
    height: auto;
}

/* Header styles */
.page-header {
    padding: 20px;
    margin: -20px -20px 20px -20px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.company-logo {
    object-fit: contain;
}

.company-logo:first-child {
    width: 120px;
    height: auto;
    margin-right: 120px;
}

.company-logo:last-child {
    width: 240px;
    height: auto;
}

.page-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
    text-align: center;
    flex: 1;
    padding: 0 40px;
}

/* Filter section styles */
.filter-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
}

.filter-header span {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expand-toggle {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filter-content {
    flex: 1;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto;
}

/* Common container styles */
.checkbox-container,
.search-container,
.savings-filter-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Common input styles */
input[type="text"],
input[type="number"],
.sort-button {
    width: 100%;
    padding-top: 10px;
    padding: 8px 12px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
.sort-button:focus {
    outline: none;
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

input::placeholder {
    color: var(--text-muted);
}

/* Range inputs specific styles */
.savings-range {
    padding-left: 17px;
    width: 80%;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    padding-top: 10px;
}

.range-inputs input {
    flex: 1;
    min-width: 60px;
}

.range-separator {
    color: var(--secondary-color);
    font-weight: 600;
    margin: 0 5px;
}

/* Sort button specific styles */
.sort-button {
    background: white;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
}

.sort-button:hover {
    background: var(--background-light);
    border-color: var(--success-color);
}

.sort-button i {
    color: var(--success-color);
    transition: transform 0.2s ease;
}

.sort-button.ascending i {
    transform: rotate(180deg);
}

/* Slider styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 10px;
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    z-index: 1;
}

.slider-range {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgb(96,148,216);
    border-radius: 2px;
    pointer-events: none;
}

.slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}

.slider::-webkit-slider-thumb,
.slider::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgb(0,56,248);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.slider::-webkit-slider-thumb:hover,
.slider::-webkit-slider-thumb:active,
.slider::-moz-range-thumb:hover,
.slider::-moz-range-thumb:active {
    transform: scale(1.1);
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestions div {
    padding: 8px 12px;
    cursor: pointer;
}

.suggestions div:hover {
    background: var(--background-light);
}

/* Tooltip styles */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--blue-color);
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    cursor: help;
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Table styles */
td, th {
    padding: 12px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

td:last-child, th:last-child {
    border-right: none;
}

/* Upload section */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    margin-top: 100px;
}

.upload-box {
    text-align: center;
    padding: 40px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background-color: var(--background-light);
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.upload-box:hover {
    border-color: var(--blue-color);
    background-color: #f1f4f9;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.upload-box h2 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.upload-box p {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.upload-btn {
    background-color: var(--blue-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.upload-btn:hover {
    background-color: #0056b3;
}

.file-name {
    margin-top: 15px;
    color: #495057;
    font-size: 0.9em;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-content h2 {
    color: var(--primary-color);
    margin: 30px 0;
    font-size: 24px;
}

.gear-container {
    position: relative;
    height: 100px;
    margin-bottom: 20px;
}

.gear-large, .gear-small {
    position: absolute;
    animation: spin 4s linear infinite;
}

.gear-large {
    left: 50%;
    margin-left: -15px;
    font-size: 60px;
}

.gear-small {
    left: calc(50% + 35px);
    top: 20px;
    font-size: 40px;
    animation-direction: reverse;
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px auto;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--blue-color);
    animation: progress 5s ease-in-out;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    20% { width: 20%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

#main-content h3 {
    text-align: center;
    font-size: 1.8em;
    color: var(--primary-color);
    margin: 40px 0 30px;
    font-weight: 600;
} 