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

body {
    font-family: "Lato", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.header {
    display: flex;
    background-color: #3e4a3c; /* Darker green-grey, from Ferrari styling */
    color: white;
    padding: 2px;
    text-align: center;
    margin: auto;
}

.sidebar {
    height: 100%;
    width: 200px;
    background-color: #333;
    position: fixed !important;
    z-index: 1;
    overflow: auto;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3e4a3c; /* Darker green-grey, from Ferrari styling */
    overflow: hidden;
    margin-bottom: 0px;
}

.navbar a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #4caf50; /* Bright green from Ferrari styling */
    color: white;
}

input {
    text-align: justify;
}

.wide-input {
    width: 250px;
    margin-right: 0px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.label-wide {
    width: 100px;
}

.column {
    float: left;
    /* width: calc(30% - 30px);  Adjust width to account for margin */
    min-width: 285px;
    margin-right: 10px;
    margin-left: 10px;
}

.button-container {
    display: flex;
    padding-bottom: 10px;
    flex-direction: column;
    align-items: center;
}

.client-label {
    color: black;
    display: block;
    font-weight: bold;
    text-align: center;
}

.row:after {
    content: "";
    display: table;
    clear: both;
}

.text-input {
    width: 100%; /* Adjust as needed */
    padding: 10px; /* Increases the padding inside the input */
}

.dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 20px;
    margin-top: 0px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-sales {
    margin-top: 10px;
    padding-left: 20px;
    padding-right: 40px;
    padding-top: 10px;
}

.dashboard-heading {
    align-items: flex-start;
    text-align: left;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color: #fff;
    background-color: #4caf50; /* Bright green from Ferrari styling */
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #388e3c; /* Darker green from Ferrari styling */
    color: white;
}

.button:active {
    background-color: #388e3c;
    transform: translateY(2px);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    overflow: hidden;
    table-layout: fixed; /* Fixed table layout for better control */
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #edf7fd;
}

.table th {
    padding: 14px 15px;
    text-align: left;
    background-color: #3e4a3c; /* Darker green-grey */
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.table tr td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

table tr td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table-container {
    max-height: 500px; /* Fixed height for vertical scrolling */
    overflow-y: auto;
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    /* Add scroll shadow effect */
    background:
        /* Shadow at the top */
        linear-gradient(white 30%, rgba(255, 255, 255, 0)) 0 0,
        /* Shadow at the bottom */
        linear-gradient(rgba(255, 255, 255, 0), white 70%) 0 100%,
        /* Shadow at the right */
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.2), transparent) 100% 0,
        /* Shadow at the left */
        radial-gradient(farthest-side at 0% 50%, rgba(0,0,0,0.2), transparent) 0 0;
    background-repeat: no-repeat;
    background-size: 100% 40px, 100% 40px, 15px 100%, 15px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Make the scrollbar nicer for webkit browsers */
.table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content {
    text-align: center;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

/* Box styles */
.box-wide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 85%;
    max-width: 1400px;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.box-narrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 350px;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.box-table {
    display: table;
    width: 85%;
    margin: 20px auto;
    padding: 20px;
    text-align: left;
    max-width: 1400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.box-table-view {
    display: block;
    width: 85%;
    margin: 20px auto;
    padding: 20px;
    text-align: left;
    max-width: 1400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 780px; /* Set a fixed height */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Hide horizontal scrolling */
    position: relative; /* Ensure proper stacking context */
}

/* Fixed table headers for box-table-view */
.box-table-view table {
    border-collapse: collapse;
    width: 100%;
    position: relative;
}

/* Add this to ensure table cells have a solid background */
.box-table-view td {
    background-color: #fff;
    position: relative;
    z-index: 1;
}

.box-table-view th {
    position: sticky;
    top: 0;
    background-color: #3e4a3c; /* Darker green-grey */
    color: white;
    z-index: 20;
    padding: 12px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.box-label {
    width: 100px;
    border-collapse: collapse;
}

/* Notes tooltip */
.notes-tooltip {
    display: block;        
    max-width: 100%;              
    width: 100%;                 
    white-space: nowrap;          
    overflow: hidden;             
    text-overflow: ellipsis;      
    /* vertical-align: middle; */
    position: relative;
    box-sizing: border-box;
}

.notes-tooltip:hover::after {
    content: attr(title);         /* Use the title attribute as the content */
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 5px;
    white-space: normal;          /* Allow wrapping in the tooltip */
    z-index: 10;
    min-width: 200px;
    max-width: 400px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* File explorer styles */
.file-explorer {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.file-item:hover {
    background-color: #f0f0f0;
}

.file-name {
    flex-grow: 1;
}

.file-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.file-icon {
    margin-right: 8px;
}

/* Additional Ferrari styles */
.number-column {
    text-align: right !important;
    font-family: monospace;
    font-size: 14px;
}

.badge {
    background: #4caf50; /* Bright green */
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: #3e4a3c; /* Darker green-grey */
    border-radius: 5px 5px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.tab-button {
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.tab-button:hover {
    background: rgba(255,255,255,0.1);
}

.tab-button.active {
    background: #4caf50; /* Bright green */
    font-weight: 600;
}

/* Filter Panel */
.filter-panel {
    background: #f5f7f5; /* Very light green-grey */
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.form-group {
    flex: 1;
    min-width: 150px;
    margin: 0 10px 10px 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    margin-right: 10px;
}

.btn-primary {
    background: #4caf50; /* Bright green */
    color: white;
}

.btn-primary:hover {
    background: #388e3c; /* Darker green */
}

.btn-secondary {
    background: #7d8979; /* Muted green-grey */
    color: white;
}

.btn-secondary:hover {
    background: #646b60; /* Darker grey-green */
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    max-height: 500px; /* Fixed height for vertical scrolling */
    overflow-y: auto;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background:
        /* Shadow at the top */
        linear-gradient(white 30%, rgba(255, 255, 255, 0)) 0 0,
        /* Shadow at the bottom */
        linear-gradient(rgba(255, 255, 255, 0), white 70%) 0 100%,
        /* Shadow at the right */
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.2), transparent) 100% 0,
        /* Shadow at the left */
        radial-gradient(farthest-side at 0% 50%, rgba(0,0,0,0.2), transparent) 0 0;
    background-repeat: no-repeat;
    background-size: 100% 40px, 100% 40px, 15px 100%, 15px 100%;
    background-attachment: local, local, scroll, scroll;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    overflow: hidden;
    table-layout: fixed; /* Fixed table layout for better control */
}

.data-table thead {
    background: #3e4a3c; /* Darker green-grey */
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Add shadow to header for depth */
}

.data-table th {
    padding: 14px 15px; /* Slightly larger padding for headers */
    text-align: left;
    border-bottom: 1px solid #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

/* Add even row striping for better readability */
.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Add hover effect */
.data-table tbody tr:hover {
    background-color: #edf7fd;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.pagination-button {
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #4caf50; /* Bright green */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.pagination-button:hover {
    background-color: #388e3c; /* Darker green */
}

.pagination-button.disabled {
    background-color: #c5c5c5; /* Light grey */
    color: #757575; /* Medium grey */
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 15px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 5px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    color: #757575; /* Medium grey */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state i {
    color: #c5c5c5; /* Light grey */
    margin-bottom: 15px;
}

.empty-state h3 {
    margin: 0;
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-group {
        flex: 1 0 100%;
        margin-right: 0;
    }
    
    .tab-button {
        padding: 10px;
        font-size: 13px;
    }
    
    .tab-button i {
        margin-right: 0;
        display: block;
        font-size: 16px;
        margin-bottom: 5px;
    }
}

/* Status Badges */
.badge-hot {
    background-color: #ff5252;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    text-align: center;
}

.badge-warm {
    background-color: #ffb142;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    text-align: center;
}

.badge-cool {
    background-color: #70a1ff;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    text-align: center;
}

.badge-default {
    background-color: #bdc3c7;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    text-align: center;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-right: 10px;
    font-size: 16px;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left-color: #c62828;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left-color: #2e7d32;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left-color: #1565c0;
}
