:root {
    --primary-blue: #4a90e2;
    --secondary-blue: #95aac9;
    --panel-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #8395a7;
    --border-color: #e8ecef;
    --metric-bg: #eef2f7;
    --chart-color-1: #7e7e7e93;
    --chart-color-2: #7e7e7e93;
    --chart-color-3: #7e7e7e93;
    --chart-color-4: #7e7e7e93;
    --chart-color-5: #7e7e7e93;
    --chart-color-6: #7e7e7e93;
}

.logo{
    margin-bottom: 30px;
}

.login-page {
    background-image: url('../../assets/loginbackground.jpg');
    background-repeat: no-repeat;
    background-position: center contain;
    background-size: 100%;
    background-attachment: fixed;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #dadbdbe8;
    color: var(--text-dark);
}

.port-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.port-name {
    margin-left: 40px;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.weather-info {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: var(--metric-bg);
    border-radius: 6px;
    white-space: nowrap;       
    overflow: hidden;           
    text-overflow: ellipsis;    
    font-size: clamp(0.6rem, 1vw, 1rem); 
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;         
    flex-shrink: 1;            
}

.upload-section {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    text-align: center;
}

.file-input {
    opacity: 0.8;
    font-size: 0.8rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
}

.upload-button {
    opacity: 0.8;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.upload-button:hover, .file-input:hover {
    opacity: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    padding-bottom: 5rem;
    grid-auto-rows: minmax(100px, auto);
}

.panel {
    background: var(--panel-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    height: 220px;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}

.panel.medium {
    grid-column: span 2;
}

.panel.full-width {
    grid-column: 1 / -1;
    height: 300px;
    margin-bottom: 1rem;
}

.panel h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.metric {
    background: var(--metric-bg);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
}

.chart {
    flex-grow: 1;
    width: 95%;
    min-height: 120px;
    max-height: 2000px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.panel.full-width .chart {
    min-height: 180px;
    max-height: 200px;
}

.buttons-container {
    display: flex;
    gap: 10px;
}

.date-range-container {
    margin-left: 20px;
}

.date-range-selector {
    background: var(--panel-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    flex-direction: row; 
    align-items: center; 
    gap: 0.5rem; 
    width: auto; 
    margin-left: auto; 
}

.date-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.date-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-button:hover {
    background-color: #357abd;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .panel.full-width .metrics-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .panel {
        grid-column: 1 / -1 !important;
    }
    .panel.full-width .metrics-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    z-index: 1000;
}

.login-form {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(18,38,63,.1);
    width: 100%;
    max-width: 400px;
}

.video-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    background-image: url('../../assets/backgroundbio.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: none;
}

.video-transition.active {
    display: block;
    opacity: 1;
}

.video-transition video {
    width: 70%;
    height: 70%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

.card:hover {
    height: 200px;
    transform: skew(0deg);
}

.temperature{
    font-size: 0.8vw;
    font-weight: 600;
    margin: 0.5rem;
    white-space: nowrap;       
    overflow: hidden;           
    text-overflow: ellipsis;   
}

.card h1 {
    text-align: center;
    margin: 1.3rem;
    color: black;
    font-size: 1.5rem;
}

.extra-info {
    margin-top: 3vh;
    display: flex;
    flex-direction: column; 
    gap: 20px; 
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.card:hover .extra-info {
    opacity: 1;
    transform: translateY(0);
}

.impcard {
    width: 320px;
    min-width: 0;
    height: 100px;
    padding: 0.5rem;
    background: rgb(253, 253, 253);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border-bottom: 3px solid rgba(255, 255, 255, 0.440);
    border-left: 2px rgba(255, 255, 255, 0.545) outset;
    transition: .4s;
    overflow: hidden;
    color: black;
    flex: 1.5;
}

.temp-indicator-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.quality-indicator-inline {
    font-size: 0.8em;
    display: flex;
    align-items: center;
    margin-left: auto; 
}

.quality-indicator-inline .color-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.impcard:hover {
    height: 260px;
    transform: skew(0deg);
}

.impurity-header {
    display: flex;
    align-items: center;
    justify-content: space-between; 
}

.impurity-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.impurity-selector label {
    font-size: 0.7rem;
    color: #505050;
}

.impurity-selector select {
    padding: 4px;
    font-size: 0.7rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
    width: 150px;
}

.impcard:hover .extra-info {
    opacity: 1;
    transform: translateY(0);
}

.impcard h1 {
    text-align: center;
    margin: 0.9rem;
    color: black;
    font-size: 1.5rem;
}

.reset-button-container {
    display: flex;
    justify-content: center;
    margin-top: 15px; 
    width: 100%;
}

.reset-button {
    background-color: var(--primary-blue); 
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.reset-button:hover {
    background-color: #c9302c;
}


.date-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content; 
    margin: 0 auto; 
}


.color-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-heading {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.legend-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.green-circle {
    background-color: #4CAF50;
}

.yellow-circle {
    background-color: #FFC107;
}

.red-circle {
    background-color: #F44336;
}

.blue-circle {
    background-color: #2196F3;
}

.legend-text {
    font-size: 13px;
    color: #333;
}


.bar1, .bar2, .bar3 {
    width: 30px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: 0.3s;
    margin: 4px 0; 
}

.change .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
}



.sidebar {
    position: fixed;
    left: 0px;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative; 
}


.sidebar-header::before,
.sidebar-header::after,
.sidebar-header h3::before,
.sidebar-header h3::after {
    content: none !important;
    display: none !important;
}
.sidebar-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.sidebar-header .close-btn,
.sidebar-header [class*="close"],
.sidebar-header [aria-label*="close"],
.sidebar-header [aria-label*="Close"] {
    display: none !important;
}


.sidebar-header h3::after {
    content: "";
}


.sidebar-content {
    padding: 15px;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.sidebar-menu li a:hover {
    background-color: #f0f0f0;
}

.menu-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}


.dashboard-content {
    transition: margin-left 0.3s ease;
}




.submenu-category {
    margin: 5px 0;
}

.subcategory-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    justify-content: space-between;
}

.subcategory-header:hover {
    background-color: #e5e5e5;
}

.continent-icon {
    margin-right: 5px;
}

.subcategory-header.collapsed .expand-icon {
    transform: rotate(-90deg);
}


.port-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu-category.active .port-list {
    max-height: 500px; 
    transition: max-height 0.5s ease;
}

.port-list li {
    margin: 5px 0;
}

.port-list li a {
    display: block;
    padding: 6px 10px;
    color: #444;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.port-list li a:hover {
    background-color: #e0e0e0;
}


.port-list li a.current {
    background-color: #e3f2fd;
    border-left: 3px solid #1976d2;
    font-weight: 500;
}


.port-header {

    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-update {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}





.port-info {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.header-logo {
    height: 40px;
    max-width: 200px;
    object-fit: contain;
}




.logout-button {
    padding: 6px 15px;
    background-color: #e05a68;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-button:hover {
    background-color: #c82333;
    text-decoration: none;
    color: white;
}

.download-button {
    padding: 6px 15px;
    background-color: #a4aca6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-right: 15px;
}

.download-button:hover {
    background-color: #979e99;
}


@media (max-width: 768px) {
    .logout-button,
    .download-button {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .download-button {
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .logout-button,
    .download-button {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .download-button {
        margin-right: 8px;
    }
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}


.modal {
    background-color: white;
    border-radius: 8px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}


.modal-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: sticky;
    top: 0;
    z-index: 5;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #333;
}


.modal-body {
    padding: 20px;
    font-size: 0.75rem;
}

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

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

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

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

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}


.warning-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.card-container {
    display: flex;
    gap: 1vh;
    align-items: flex-start; 
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;
}


.card {
    width: 190px;
    min-width: 0; 
    height: 100px;
    padding: 0.5rem;
    background: rgb(252, 251, 251);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border-bottom: 3px solid rgba(255, 255, 255, 0.440);
    border-left: 2px rgba(255, 255, 255, 0.545) outset;
    transition: .4s;
    overflow: hidden;
    color: black;
    flex: 1;
}

.date-range-container {
    width: 30%; 
    min-width: 0; 
    margin-left: auto; 
    flex-shrink: 1;
}


.date-range-selector {
    background: var(--panel-bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}


.date-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.9rem;
    width: 110px;
    min-width: 0;
}


.date-range-selector span {
    font-size: 0.9rem;
    flex-shrink: 1;
}


.date-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-width: 0; 
    flex-shrink: 1;
}


.color-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-heading {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

.legend-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; 
    gap: 12px;
    white-space: nowrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.color-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.green-circle {
    background-color: #4CAF50;
}

.yellow-circle {
    background-color: #FFC107;
}

.red-circle {
    background-color: #F44336;
}

.blue-circle {
    background-color: #2196F3;
}

.legend-text {
    font-size: 13px;
    color: #333;
}

.hamburger-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.bar1, .bar2, .bar3 {
    width: 30px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: 0.3s;
    margin: 4px 0;
}

.change .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

.sidebar {
    position: fixed;
    left: 0px;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative; 
}

.sidebar-header::before,
.sidebar-header::after,
.sidebar-header h3::before,
.sidebar-header h3::after {
    content: none !important;
    display: none !important;
}

.sidebar-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.sidebar-header .close-btn,
.sidebar-header [class*="close"],
.sidebar-header [aria-label*="close"],
.sidebar-header [aria-label*="Close"] {
    display: none !important;
}

.sidebar-header h3::after {
    content: "";
}

.sidebar-content {
    padding: 15px;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.sidebar-menu li a:hover {
    background-color: #f0f0f0;
}

.menu-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

.dashboard-content {
    transition: margin-left 0.3s ease;
}

.submenu-category {
    margin: 5px 0;
}

.subcategory-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    justify-content: space-between;
}

.subcategory-header:hover {
    background-color: #e5e5e5;
}

.continent-icon {
    margin-right: 5px;
}

.subcategory-header.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.port-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu-category.active .port-list {
    max-height: 500px; 
    transition: max-height 0.5s ease;
}

.port-list li {
    margin: 5px 0;
}

.port-list li a {
    display: block;
    padding: 6px 10px;
    color: #444;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.port-list li a:hover {
    background-color: #e0e0e0;
}

.port-list li a.current {
    background-color: #e3f2fd;
    border-left: 3px solid #1976d2;
    font-weight: 500;
}

.port-header {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-update {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.port-info {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.header-logo {
    height: 40px;
    max-width: 200px;
    object-fit: contain;
}

.logout-button {
    padding: 5px 12px;  
    background-color: #e05a68;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 0.9rem;  
}

.logout-button:hover {
    background-color: #c82333;
    text-decoration: none;
    color: white;
}

.download-button {
    padding: 5px 12px;  
    background-color: #a4aca6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-right: 12px;  
    font-size: 0.9rem;  
}

.download-button:hover {
    background-color: #979e99;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    
    /* MODAL FIX - THESE 3 LINES SOLVE THE SCROLLING ISSUE */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* MODAL FIX - KEEPS HEADER FIXED */
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.modal-headers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
}

.modal-title {
  flex-grow: 1;
  text-align: center;
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-close.left {
  font-size: 1.5rem;
  cursor: pointer;
  margin-right: auto;
}

.modal-placeholder {
  width: 1.5rem; /* Matches the close icon size */
  visibility: hidden;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    
    /* MODAL FIX - ENABLES SCROLLING */
    overflow-y: auto;
}

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

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

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    
    /* MODAL FIX - KEEPS BUTTONS AT BOTTOM */
    flex-shrink: 0;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Form field improvements */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    vertical-align: middle;
}

.form-group label[for="containsAlgae"] {
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 20px;
}

#containsAlgae {
    transform: scale(1.2);
}

/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .logout-button,
    .download-button {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .download-button {
        margin-right: 8px;
    }
    
    .date-range-container {
        width: 28%;
    }
    
    .date-input {
        width: 100px;
        font-size: 0.85rem;
    }
    
    .date-button {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .date-range-selector span {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .logout-button,
    .download-button {
        padding: 3px 6px;
        font-size: 0.8rem;
    }
    
    .download-button {
        margin-right: 6px;
    }
}

/* Icon styles */
.fas, .far, .fab {
    margin-right: 5px;
    width: 16px;
    text-align: center;
}

.card .icon i,
.impcard .icon i {
    font-size: 0.9rem;
    color: #505050;
}

.panel h3 .icon i {
    font-size: 0.95rem;
    color: #4a90e2;
}

.sidebar-menu li a i {
    width: 20px;
    margin-right: 8px;
    color: #505050;
}

.weather-info .weather-icon i {
    color: #4a90e2;
    font-size: 0.9rem;
}

.download-button i {
    margin-right: 5px;
}

.logout-button i {
    margin-right: 5px;
}

.last-update .weather-icon i {
    color: #6c757d;
    margin-right: 5px;
}

/* Text formatting */
sub {
    font-size: 0.7em;
    margin-left: 1px;
    margin-right: 1px;
}

.icon-gray {
    color: #6c757d !important;
}

.subscript {
    font-size: 0.7em;
    vertical-align: sub;
    margin-left: 0px;
    line-height: 0;
}

.no-space {
    font-size: 0.7em;
    vertical-align: sub;
    margin-left: -1px;
    padding-right: 0;
    letter-spacing: -1px;
}

.co2-text {
    font-weight: bold;
    margin-right: 5px;
    color: #505050;
}

.co2-text-blue {
    font-weight: bold;
    margin-right: 5px;
    color: #1e88e5; 
}

.unit-text {
    margin-left: 10px; 
    color: #777;
}

/* Additional responsive date range styles */
@media (max-width: 1600px) {
    .date-range-container {
        width: 28%;
    }
}

@media (max-width: 1400px) {
    .date-range-container {
        width: 25%;
    }
    
    .date-input {
        width: 100px;
        font-size: 0.85rem;
    }
    
    .date-button {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .date-range-selector span {
        font-size: 0.85rem;
    }
}

@media (max-width: 1200px) {
    .date-range-container {
        width: 22%;
    }
    
    .date-input {
        width: 90px;
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .date-button {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }
    
    .legend-heading {
        font-size: 12px;
    }
    
    .legend-text {
        font-size: 11px;
    }
    
    .color-circle {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 1000px) {
    .date-range-container {
        width: 20%;
    }
    
    .date-input {
        width: 80px;
        padding: 0.3rem;
        font-size: 0.75rem;
    }
    
    .date-button {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .date-range-selector span {
        font-size: 0.75rem;
    }
    
    .legend-heading {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .legend-text {
        font-size: 10px;
    }
    
    .color-circle {
        width: 9px;
        height: 9px;
    }
    
    .legend-container {
        gap: 8px;
    }
}

@media (max-width: 900px) {
    .date-range-container {
        width: 18%;
    }
    
    .date-range-selector {
        padding: 0.5rem 0.75rem;
    }
    
    .date-input {
        width: 70px;
        font-size: 0.7rem;
    }
    
    .date-button {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

@media (max-width: 800px) {
    .date-range-container {
        width: 16%;
    }
    
    .date-input {
        width: 65px;
        font-size: 0.65rem;
    }
    
    .date-button {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }
    
    .date-range-selector span {
        font-size: 0.65rem;
        margin: 0 1px;
    }
    
    .color-circle {
        width: 8px;
        height: 8px;
    }
    
    .legend-heading {
        font-size: 10px;
    }
    
    .legend-text {
        font-size: 9px;
    }
}

@media (max-width: 700px) {
    .date-range-container {
        width: 14%;
    }
    
    .date-range-selector {
        padding: 0.4rem 0.5rem;
        gap: 2px;
    }
    
    .date-input {
        width: 60px;
        font-size: 0.6rem;
        padding: 0.2rem;
    }
    
    .date-button {
        font-size: 0.6rem;
        padding: 0.2rem 0.3rem;
    }
    
    .color-circle {
        width: 7px;
        height: 7px;
    }
    
    .legend-container {
        gap: 5px;
    }
}

@media (max-width: 600px) {
    .date-range-container {
        width: 12%;
    }
    
    .date-input {
        width: 55px;
        font-size: 0.55rem;
    }
    
    .date-button {
        font-size: 0.55rem;
        padding: 0.2rem;
    }
    
    .color-circle {
        width: 6px;
        height: 6px;
    }
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 80vh;       /* limit modal height to 80% of viewport height */
  overflow-y: auto;       /* add vertical scroll if content is too tall */
  width: 60%;             /* a moderate width */
  max-width: 700px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 2000;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.large-modal {
  width: 70%;             /* slightly wider for large modals */
  max-width: 800px;
  padding: 25px;
}

/* keep input, textarea, select styling */
.large-modal input,
.large-modal textarea,
.large-modal select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.notification-icon {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}
.admin-modal-content {
  width: 700px;
  max-width: 90%;
  margin: 0 auto;
  padding: 30px;
  box-sizing: border-box;
}

.admin-modal-content .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.admin-modal-content input,
.admin-modal-content textarea,
.admin-modal-content select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-top: 5px;
  box-sizing: border-box;
}

.admin-modal-content .form-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.text-warning {
    color: orange !important;
}

.modals {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content.issue-modal {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;         /* limits modal height to 90% of viewport */
  overflow-y: auto;         /* allows scrolling if content overflows */
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.port-name-banner {
  background: #f0f7ff;
  border-left: 5px solid #1976d2;
  padding: 10px 15px;
  margin-bottom: 20px;
  font-size: 15px;
  color: #0d47a1;
}

.issue-header {
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}

.issue-options label {
  display: block;
  padding: 10px 12px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #f9f9f9;
  cursor: pointer;
  font-size: 14px;
}

.issue-options label:hover {
  background: #f0f8ff;
}

#issue-notes {
  width: 100%;
  height: 80px;
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.submit-issue-btn {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 15px;
  flex: 1;
  cursor: pointer;
}

.cancel-btn {
  background: #ccc;
  color: #333;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.success-msg {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px;
  border-left: 4px solid #2e7d32;
  border-radius: 6px;
  font-size: 14px;
}

.malfunction-card {
  background: #fff;
  border-left: 5px solid #e74c3c;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.malfunction-card h4 {
  color: #e74c3c;
  margin-bottom: 6px;
}
.malfunction-card .btn-group {
  margin-top: 10px;
}
.malfunction-card .btn-group button {
  margin-right: 8px;
}
.malfunction-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 12px; /* space between icon+badge and label */
}
.battery-icon i {
  font-size: 26px;
}

.battery-icon.low {
  color: #ff4b4b !important;
}

.battery-icon.charging {
  color: #4caf50 !important;
}
