/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a365d;
    color: white;
    min-height: 100vh;
}

/* Demo Badge */
.demo-badge {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

.demo-text {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #1a365d;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.header-title {
    text-align: center;
    margin-bottom: 10px;
}

.page-title {
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--dsv-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dsv-secondary);
}

.btn-secondary {
    background-color: var(--dsv-secondary);
    color: white;
    padding: 12px 24px;
    font-size: 16px;
}

.btn-secondary:hover {
    background-color: var(--dsv-accent);
}

.settings-btn {
    margin-top: 10px;
}

/* Terminal Controls */
.terminal-controls {
    background-color: var(--dsv-light);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--dsv-secondary);
}

.control-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Input Styles */
.date-picker-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: white;
    border-radius: 5px;
    padding: 2px;
}

.date-input {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 14px;
    width: 150px;
}

.calendar-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.date-nav-btn {
    background-color: #1a365d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.date-nav-btn:hover {
    background-color: #553c9a;
}

.date-nav-btn:active {
    background-color: #6b46c1;
}

.text-input {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 14px;
    width: 200px;
}

/* Dropdown Styles */
.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dropdown-label {
    font-size: 12px;
    font-weight: bold;
}

.dropdown-label.red {
    color: #fc8181;
}

.dropdown-label.white {
    color: white;
}

.dropdown {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 14px;
    width: 150px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Main Content */
.main-content {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Report Tabs */
.report-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a365d;
}

.tab-btn {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: none;
}

.tab-btn:hover {
    background-color: #edf2f7;
    color: #2d3748;
}

.tab-btn.active {
    background-color: #1a365d;
    color: white;
    border-color: #1a365d;
}

/* New Tab Content Styling */
.statistics-container,
.distribution-container,
.xsite-report-container {
    padding: 30px;
    background-color: var(--dsv-light);
    border-radius: 8px;
    border: 1px solid var(--dsv-secondary);
    margin: 20px 0;
}

.statistics-container h2,
.distribution-container h2,
.xsite-report-container h2 {
    color: var(--dsv-primary);
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid var(--dsv-accent);
    padding-bottom: 10px;
}

.statistics-container p,
.distribution-container p,
.xsite-report-container p {
    color: var(--dsv-dark);
    font-size: 16px;
    line-height: 1.6;
}

/* Statistics Tabs Styling */
.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--dsv-secondary);
    padding-bottom: 10px;
}

.stats-tab-btn {
    padding: 10px 20px;
    background-color: var(--dsv-light);
    color: var(--dsv-dark);
    border: 2px solid var(--dsv-secondary);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: none;
}

.stats-tab-btn:hover {
    background-color: var(--dsv-secondary);
    color: white;
}

.stats-tab-btn.active {
    background-color: var(--dsv-primary);
    color: white;
    border-color: var(--dsv-primary);
}

/* Statistics Tab Content */
.stats-tab-content {
    display: none;
}

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

/* Statistics Filters */
.stats-filters {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--dsv-secondary);
    margin-bottom: 20px;
}

.stats-top-row,
.stats-bottom-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: var(--dsv-dark);
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--dsv-secondary);
    border-radius: 4px;
    font-size: 14px;
}

.filter-group small {
    color: var(--dsv-dark);
    font-size: 12px;
    font-style: italic;
}

/* Statistics Results */
.stats-results {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--dsv-secondary);
    margin-top: 20px;
    min-height: 200px;
}

/* Statistics Summary */
.stats-summary {
    background-color: var(--dsv-light);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--dsv-accent);
}

.stats-summary p {
    margin: 5px 0;
    color: #333;
    font-weight: 500;
}

.stats-summary strong {
    color: #000;
    font-weight: 600;
}

/* Statistics Tables */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: white;
}

.stats-table th,
.stats-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--dsv-secondary);
    color: #333;
}

.stats-table th {
    background-color: var(--dsv-primary);
    color: white;
    font-weight: 600;
}

.stats-table tbody tr:hover {
    background-color: var(--dsv-light);
}

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

.location-deviations {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.location-deviations h5 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 1.1em;
}

.location-deviations p {
    color: #333;
    margin: 10px 0;
}

/* Statistics Report Text Colors */
#tlidResults h3,
#tlidResults h4,
#tlidResults h5 {
    color: #333;
}

#tlidResults h3 {
    color: #1a365d;
    font-size: 1.5em;
    margin-bottom: 20px;
}

#tlidResults h4 {
    color: #2d3748;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

#tlidResults h5 {
    color: #007bff;
    font-size: 1.1em;
    margin: 20px 0 15px 0;
}

/* Ensure all text in statistics results is dark */
#tlidResults,
#distriktResults,
#volymResults,
#kvarlamnatResults,
#exportResults {
    color: #333;
}

#tlidResults p,
#distriktResults p,
#volymResults p,
#kvarlamnatResults p,
#exportResults p {
    color: #333;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Detail Controls */
.detail-controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.detail-controls .filter-group {
    margin-bottom: 0;
}

.detail-controls label {
    color: white;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.detail-table-container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px;
    overflow: auto;
}

/* Background pattern with horizontal lines */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(0, 180, 216, 0.1) 20%, transparent 40%),
        linear-gradient(90deg, transparent 60%, rgba(72, 202, 228, 0.1) 80%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(144, 224, 239, 0.05) 20%, transparent 40%),
        linear-gradient(0deg, transparent 60%, rgba(0, 180, 216, 0.05) 80%, transparent 100%);
    background-size: 100% 2px, 100% 2px, 100% 2px, 100% 2px;
    background-position: 0 10%, 0 30%, 0 50%, 0 70%;
    background-repeat: repeat-y;
    pointer-events: none;
    z-index: 1;
}

/* Ensure content is above background */
.main-content > * {
    position: relative;
    z-index: 2;
}



/* Table Layout */
.table-layout {
    display: flex;
    gap: 20px;
    height: 100%;
}

/* Detailed Report Navigation */
.detailed-report-navigation {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.detailed-report-navigation .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Detailed Report Content */
.detailed-report-content {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Detailed Report Content Styling */
.detailed-report-section {
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.detailed-report-section h4 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 1.1em;
}

.detailed-report-section p {
    margin: 5px 0;
    color: #333;
}

.detailed-report-section strong {
    color: #000;
}

.detailed-report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
}

.detailed-report-table th,
.detailed-report-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    color: #333;
}

.detailed-report-table th {
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
}

.detailed-report-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Deviation breakdown table styling */
.deviation-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.deviation-breakdown-table th,
.deviation-breakdown-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.deviation-breakdown-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.table-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Table Styles */
.production-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: table;
}

/* Fixed header */
.production-table thead {
    background-color: #1a365d;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Fixed footer */
.production-table tfoot {
    background-color: #1a365d;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Scrollable body */
.production-table tbody {
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.production-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.production-table thead tr,
.production-table tfoot tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.production-table th {
    background-color: #1a365d;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    min-height: 40px;
    vertical-align: top;
}

.production-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #cbd5e0;
    background-color: white;
    color: #333;
    font-size: 12px;
}

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

.location-cell {
    font-weight: 600;
    color: #2d3748;
    background-color: #edf2f7 !important;
    cursor: pointer;
    position: relative;
}

.location-cell:hover {
    background-color: #e2e8f0 !important;
    color: #1a202c;
}

.location-cell.clicked {
    background-color: #4299e1 !important;
    color: white !important;
}



.data-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    text-align: right;
}

.data-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.total-cell {
    background-color: #f7fafc;
    font-weight: bold;
}

.totals-row {
    background-color: #1a365d !important;
}

.totals-row td {
    background-color: #1a365d !important;
    color: white;
    font-weight: bold;
}

.totals-label {
    background-color: #1a365d !important;
    color: white !important;
    font-weight: bold;
}

.totals-cell {
    background-color: #1a365d !important;
    color: white !important;
    font-weight: bold;
    border: 1px solid #553c9a;
}

.reported-by-cell {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    text-align: center;
    vertical-align: middle;
    padding: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.underline {
    text-decoration: underline;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Make Add Report modal wider */
#addReportModal .modal-content {
    max-width: 95vw;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px auto;
    padding: 20px;
}

/* Ensure modal is visible */
#addReportModal {
    display: none;
}

#addReportModal.show {
    display: block;
}

/* Add Report Modal Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.form-left {
    flex: 2;
}

.form-right {
    flex: 1;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: #1a365d;
    font-size: 16px;
    font-weight: 600;
}

.deviationsContainer {
    margin-bottom: 15px;
}

.deviation-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    align-items: center;
}

.deviation-row select,
.deviation-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.deviation-row .remove-deviation {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.deviation-row .remove-deviation:hover {
    background-color: #c82333;
}

#addDeviationBtn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    background-color: #6c757d;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#addDeviationBtn:hover {
    background-color: #5a6268;
}

/* Ensure Add Report Modal inputs are editable */
#addReportModal .form-group input,
#addReportModal .form-group textarea,
#addReportModal .form-group select {
    background-color: white !important;
    cursor: text !important;
    pointer-events: auto !important;
}

#addReportModal .form-group input:focus,
#addReportModal .form-group textarea:focus,
#addReportModal .form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-actions {
    text-align: right;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

/* Detailed Report Table Styling */
#detailTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#detailTable th,
#detailTable td {
    padding: 10px;
    text-align: left;
    border: 1px solid #dee2e6;
}

#detailTable th {
    background-color: #1a365d;
    color: white;
    font-weight: 600;
}

#detailTable tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#detailTable tbody tr:hover {
    background-color: #e9ecef;
}

#detailTable tfoot {
    background-color: #e3f2fd;
    font-weight: 600;
}

#detailTable tfoot tr:first-child {
    background-color: #bbdefb;
    font-size: 1.1em;
}

.modal-content {
    background-color: white;
    margin: 2% 0;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    color: #333;
    position: relative;
    overflow-y: auto;
    overflow-x: auto;
}

.modal-content.large {
    max-width: 100%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

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

/* Settings Header */
.settings-header {
    margin-bottom: 20px;
}

.settings-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    color: #2d3748;
}

.settings-dropdown:focus {
    outline: none;
    border-color: #553c9a;
    box-shadow: 0 0 0 2px rgba(85, 60, 154, 0.25);
}

.settings-content {
    min-height: 300px;
}

/* DSV X Schenker Groupage Color Scheme */
:root {
    --dsv-primary: #003366;      /* Dark Blue */
    --dsv-secondary: #0066cc;    /* Medium Blue */
    --dsv-accent: #ff6600;      /* Orange */
    --dsv-light: #f8f9fa;       /* Light Gray */
    --dsv-dark: #1a202c;        /* Dark Gray */
    --dsv-success: #28a745;     /* Green */
    --dsv-warning: #ffc107;     /* Yellow */
    --dsv-danger: #dc3545;      /* Red */
}

/* Statistics Styles */
.stats-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.stats-results {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    min-height: 200px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.stats-label {
    font-weight: 600;
    color: #2d3748;
}

.stats-value {
    font-weight: bold;
    color: #553c9a;
    font-size: 16px;
}

/* Volume Graph Styles */
.volym-graph {
    display: flex;
    align-items: end;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 8px;
    min-height: 250px;
    overflow-x: auto;
}

.volym-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.volym-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.volym-bar {
    background: linear-gradient(to top, #4299e1, #3182ce);
    border-radius: 4px 4px 0 0;
    min-width: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.volym-bar:hover {
    background: linear-gradient(to top, #3182ce, #2c5aa0);
    transform: scale(1.05);
}

.volym-value {
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    position: absolute;
    bottom: 5px;
}

.volym-trend-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #e53e3e;
    border-radius: 1px;
    z-index: 10;
}

.volym-bar-item.average-bar {
    margin-left: 20px;
    border-left: 2px solid #ddd;
    padding-left: 20px;
}

.volym-bar.average {
    background: linear-gradient(to top, #38a169, #2f855a);
}

.volym-bar.average:hover {
    background: linear-gradient(to top, #2f855a, #276749);
}

.volym-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.volym-summary p {
    margin: 5px 0;
    font-size: 14px;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.settings-list {
    margin-top: 15px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f7fafc;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.settings-item span {
    font-weight: 500;
    color: #2d3748;
}

.settings-actions {
    display: flex;
    gap: 8px;
}

.settings-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-left,
    .header-center,
    .header-right {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .production-table {
        font-size: 12px;
    }
    
    .production-table th,
    .production-table td {
        padding: 8px 5px;
    }
    
    .data-input {
        font-size: 12px;
        padding: 6px;
    }
}

/* Animation for modals */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error messages */
.message {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
}

.message.success {
    background-color: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.message.info {
    background-color: #bee3f8;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

.info-content {
    line-height: 1.6;
    color: #2d3748;
    font-size: 14px;
}

.info-content h3 {
    color: #1a365d;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Delete Button Styles */
.actions-cell {
    text-align: center;
    padding: 8px 4px;
    border: 1px solid #e2e8f0;
    background-color: #f7fafc;
}

/* PIN Code Modal Styles */
.pin-modal {
    max-width: 400px;
    text-align: center;
}

.pin-header h2 {
    color: #1e293b;
    margin-bottom: 10px;
}

.pin-header p {
    color: #64748b;
    margin-bottom: 30px;
}

.pin-input-container {
    margin-bottom: 30px;
}

.pin-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-family: monospace;
}

.pin-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e2e8f0;
    transition: background-color 0.3s ease;
}

.pin-dot.filled {
    background-color: #3b82f6;
}

.pin-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.pin-actions .btn {
    min-width: 100px;
}

.pin-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pin-info {
    color: #94a3b8;
    font-size: 12px;
}

/* Hide main content when PIN modal is active */
.pin-modal.active ~ .container,
.pin-modal.active ~ .main-content {
    display: none;
}

/* PIN Modal Default State - HIDDEN FOR DEBUGGING */
#pinModal {
    display: none !important;
    z-index: 9999;
}

/* Hide ALL content until PIN is authenticated - DISABLED FOR DEBUGGING */
/* #pinModal.active ~ *,
#pinModal.active + * {
    display: none !important;
} */

/* Show PIN modal by default - DISABLED FOR DEBUGGING */
#pinModal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

/* Ensure PIN modal is always on top */
.pin-modal {
    position: relative;
    z-index: 10000;
}

/* NEW PIN Modal Styling */
.new-pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.new-pin-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.new-pin-content h2 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 24px;
}

.new-pin-content p {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 16px;
}

.new-pin-input-container {
    margin-bottom: 30px;
}

.new-pin-input-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.new-pin-input-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.new-pin-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.new-pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e2e8f0;
    transition: background-color 0.3s ease;
}

.new-pin-dot.active {
    background-color: #3b82f6;
}

.new-pin-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.new-pin-actions .btn {
    min-width: 100px;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-pin-actions .btn-primary {
    background-color: #3b82f6;
    color: white;
}

.new-pin-actions .btn-primary:hover {
    background-color: #2563eb;
}

.new-pin-actions .btn-secondary {
    background-color: #6b7280;
    color: white;
}

.new-pin-actions .btn-secondary:hover {
    background-color: #4b5563;
}

.new-pin-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
}

/* Kvarlämnat Statistics Styling */
.date-group {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.date-group h5 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 16px;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 5px;
}

.location-deviations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.deviation-details {
    margin-left: 20px;
    margin-top: 8px;
    padding-left: 15px;
    border-left: 3px solid #10b981;
}

.deviation-item {
    padding: 5px 0;
    color: #059669;
    font-size: 13px;
}

.delete-entry-btn {
    background-color: #e53e3e;
    color: white;
    border: 2px solid #c53030;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.delete-entry-btn:hover {
    background-color: #c53030;
    transform: scale(1.05);
}

.delete-entry-btn:active {
    transform: scale(0.95);
}

.delete-entry-btn.disabled {
    background-color: #a0aec0;
    border-color: #718096;
    cursor: not-allowed;
    opacity: 0.6;
}

.delete-entry-btn.disabled:hover {
    background-color: #a0aec0;
    transform: none;
}

.delete-icon {
    font-size: 14px;
    line-height: 1;
}

/* Ensure actions column has consistent width */
.production-table th:last-child,
.production-table td:last-child {
    width: 80px;
    min-width: 80px;
}
