/* iOS-Style Modern HMI Theme */

:root {
    --primary-blue: #4169E1;
    --dark-bg: #1a1a2e;
    --darker-bg: #0f0f1e;
    --panel-bg: #16213e;
    --text-light: #e0e0e0;
    --text-dim: #999;
    --accent-orange: #ffc107;
    --success-green: #4caf50;
    --danger-red: #c94444;
    --border-color: #2a2a4e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    color: var(--text-light);
    overflow: hidden;
}

.hmi-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a1628 0%, #1a1a2e 50%, #0f0f1e 100%);
}

/* Header Styling */
.hmi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(22, 33, 62, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.brand {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: white;
    text-align: center;
    flex: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.datetime {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.datetime .date {
    font-size: 14px;
    color: var(--text-light);
}

.datetime .time {
    font-size: 36px;
    font-weight: 600;
    color: white;
    line-height: 1;
}

.datetime .label {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Footer Navigation */
.hmi-footer {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
}

/* Fuel Tanks Styles */
.boat-schematic {
    margin-bottom: 30px;
    background: rgba(22, 33, 62, 0.3);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    position: relative;
}

.boat-svg {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
}

.total-fuel {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.fuel-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.fuel-value {
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.fuel-unit {
    font-size: 12px;
    color: var(--text-dim);
}

/* Tanks Grid */
.tanks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.tank-display {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.tank-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    white-space: pre-line;
    line-height: 1.4;
}

.tank-gauge {
    position: relative;
    height: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.gauge-bar {
    position: relative;
    height: 100%;
    z-index: 2;
}

.gauge-segment {
    height: 9.09%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 8px;
    transition: all 0.3s ease;
}

.gauge-segment.filled {
    background: linear-gradient(90deg, rgba(65, 105, 225, 0.6) 0%, rgba(65, 105, 225, 0.3) 100%);
}

.gauge-value {
    font-size: 9px;
    color: var(--text-dim);
}

.gauge-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(65, 105, 225, 0.8) 0%, rgba(65, 105, 225, 0.4) 100%);
    transition: height 0.5s ease;
    z-index: 1;
    border-radius: 0 0 10px 10px;
}

.tank-current {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

/* Settings Page Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.settings-panel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.panel-header {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
}

.checkbox-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-item.selected {
    background: rgba(65, 105, 225, 0.2);
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-dim);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox.active {
    background: var(--success-green);
    border-color: var(--success-green);
    position: relative;
}

.checkbox.active::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.info-panel {
    gap: 15px;
}

.info-section {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.info-title {
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    font-size: 13px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-light);
}

.time-panel {
    gap: 20px;
}

.time-adjust {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-label {
    font-size: 12px;
    color: var(--text-dim);
}

.time-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.arrow-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.arrow-btn:hover {
    background: #5179f1;
    transform: scale(1.05);
}

.time-value {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.units-panel {
    gap: 15px;
}

.units-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.unit-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-light);
}

.action-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
}

.action-btn.primary {
    background: linear-gradient(135deg, #4169E1 0%, #5179f1 100%);
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-blue);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn img {
    width: 30px;
    height: 20px;
    border-radius: 2px;
}

.language-btn:hover {
    transform: scale(1.02);
}

/* Bilge System Styles */
.system-schematic {
    background: rgba(22, 33, 62, 0.3);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    height: 100%;
}

.system-svg {
    width: 100%;
    height: 100%;
}

.alarm-bar {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #c94444 0%, #a83838 100%);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: pulse-bar 2s infinite;
}

.alarm-text {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.alarm-status {
    display: flex;
    gap: 10px;
}

.status-label {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-label.captain {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.status-label.crew-mess {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.status-label.active {
    background: white;
    color: #c94444;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-bar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.alarm-blink {
    animation: pulse 1s infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5179f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hmi-header {
        flex-direction: column;
        gap: 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .tanks-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* ============================================
   FUEL TANKS PAGE - Modern Layout
   ============================================ */

.fuel-tanks-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: calc(100vh - 180px);
}

.boat-schematic-fuel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 25px;
    align-items: center;
    min-height: 500px;
}

.boat-schematic-fuel .boat-svg {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 450px;
}

.total-fuel-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.2) 0%, rgba(42, 58, 90, 0.4) 100%);
    border-radius: 16px;
    border: 2px solid rgba(65, 105, 225, 0.4);
    min-width: 200px;
}

.total-fuel-modern .fuel-icon {
    font-size: 48px;
    line-height: 1;
}

.total-fuel-modern .fuel-info {
    text-align: center;
}

.total-fuel-modern .fuel-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-fuel-modern .fuel-value {
    font-size: 42px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 3px;
}

.total-fuel-modern .fuel-unit {
    font-size: 13px;
    color: var(--text-light);
}

.percentage-circle {
    position: relative;
    width: 100px;
    height: 100px;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: white;
}

/* Boat Overview Styles */
.boat-overview {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    height: 100%;
}

.boat-container {
    background: rgba(22, 33, 62, 0.3);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.boat-overview-svg {
    width: 100%;
    height: 100%;
}

.status-panels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 10px;
    max-height: calc(100vh - 180px);
}

.zone-panel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.zone-panel.alarm-zone {
    border-color: var(--danger-red);
    background: rgba(201, 68, 68, 0.1);
}

.zone-panel.warning-zone {
    border-color: var(--accent-orange);
    background: rgba(255, 193, 7, 0.1);
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.zone-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.zone-indicator {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.zone-indicator.normal {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.zone-indicator.warning-pulse {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-orange);
    animation: pulse 1.5s infinite;
}

.zone-indicator.alarm-blink {
    background: rgba(201, 68, 68, 0.3);
    color: var(--danger-red);
    animation: blink 0.8s infinite;
}

.zone-systems {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.system-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.system-status:hover {
    background: rgba(255, 255, 255, 0.05);
}

.system-status.state-normal {
    border-left-color: var(--success-green);
}

.system-status.state-warning {
    border-left-color: var(--accent-orange);
    background: rgba(255, 193, 7, 0.05);
}

.system-status.state-alarm {
    border-left-color: var(--danger-red);
    background: rgba(201, 68, 68, 0.1);
    animation: pulse-subtle 1.5s infinite;
}

.system-status.state-offline {
    border-left-color: #666;
    opacity: 0.6;
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.system-name {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.system-value {
    font-size: 10px;
    color: var(--text-dim);
    font-family: 'Courier New', monospace;
}

.alarm-message {
    font-size: 9px;
    color: var(--danger-red);
    font-weight: 600;
    margin-top: 2px;
    animation: pulse 1s infinite;
}

.state-indicator {
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.state-indicator.state-normal {
    color: var(--success-green);
}

.state-indicator.state-warning {
    color: var(--accent-orange);
}

.state-indicator.state-alarm {
    color: var(--danger-red);
    animation: blink 0.8s infinite;
}

/* Analytics Page Styles */
.analytics-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-panel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.chart-panel.small {
    padding: 15px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.current-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-blue);
}

.chart-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.legend-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.legend-color.port {
    background: #4169E1;
}

.legend-color.middle {
    background: #ffc107;
}

.legend-color.starboard {
    background: #c94444;
}

.chart-container {
    position: relative;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-line {
    filter: drop-shadow(0 0 3px currentColor);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-blue);
    box-shadow: 0 5px 20px rgba(65, 105, 225, 0.2);
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 12px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.stat-change.negative {
    background: rgba(201, 68, 68, 0.2);
    color: var(--danger-red);
}

.stat-change.neutral {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-orange);
}

/* Additional Animations */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.3;
    }
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes warning-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

/* Responsive for new pages */
@media (max-width: 1200px) {
    .boat-overview {
        grid-template-columns: 1fr;
    }

    .status-panels {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .metrics-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .chart-legend {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   NEW ANALYTICS STYLES - Clean & Modern
   ============================================ */

.stats-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-large {
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.6) 0%, rgba(42, 58, 90, 0.4) 100%);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(65, 105, 225, 0.3);
    transition: all 0.3s ease;
}

.stat-card-large:hover {
    transform: translateY(-5px);
    border-color: rgba(65, 105, 225, 0.6);
    box-shadow: 0 15px 40px rgba(65, 105, 225, 0.3);
}

.stat-card-large.alarm-card {
    border-color: rgba(201, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(201, 68, 68, 0.2) 0%, rgba(22, 33, 62, 0.6) 100%);
}

.stat-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-icon-large {
    font-size: 48px;
    line-height: 1;
}

.stat-title-group {
    flex: 1;
}

.stat-label-large {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
}

.stat-sublabel {
    font-size: 11px;
    color: var(--text-dim);
}

.stat-value-large {
    font-size: 48px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 15px;
}

.stat-unit {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-dim);
    margin-left: 5px;
}

.stat-progress {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4169E1, #5179f1);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar.success {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.progress-bar.danger {
    background: linear-gradient(90deg, #c94444, #e57373);
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tank Overview Panel */
.tank-overview-panel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.panel-title {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.panel-title h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0 0 5px 0;
}

.panel-subtitle {
    font-size: 12px;
    color: var(--text-dim);
}

.tank-dials-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.tank-dial-card {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tank-dial-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.tank-dial-card .dial-svg {
    max-width: 250px;
}

.tank-dial-card .gauge-value-text {
    font-size: 26px;
}

.tank-dial-card .gauge-subtext {
    font-size: 11px;
}

.tank-bars-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tank-bar-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
}

.tank-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tank-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.tank-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
}

.tank-bar-track {
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.tank-bar-fill {
    height: 100%;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    transition: width 0.5s ease;
    position: relative;
}

.tank-bar-percentage {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.tank-bar-footer {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.metric-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.metric-icon {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 12px;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.metric-gauge {
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.gauge-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.metric-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.metric-status.normal {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.metric-range {
    font-size: 10px;
    color: var(--text-dim);
}

.gauges-row {
    align-items: stretch;
}

.gauge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 290px;
}

.gauge-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.2px;
}

.dial-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.gauge-value-text {
    margin-top: -2px;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.gauge-subtext {
    font-size: 12px;
    color: var(--text-dim);
}

/* Engine Panel */
.engine-panel {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.engines-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.engine-card {
    background: linear-gradient(135deg, rgba(42, 58, 90, 0.6) 0%, rgba(22, 33, 62, 0.8) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.engine-card.port {
    border-color: rgba(65, 105, 225, 0.5);
}

.engine-card.starboard {
    border-color: rgba(201, 68, 68, 0.5);
}

.engine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.engine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.engine-label {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.engine-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.engine-status.running {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-green);
}

.engine-rpm {
    text-align: center;
    margin-bottom: 20px;
}

.rpm-value {
    font-size: 56px;
    font-weight: 700;
    color: white;
    display: block;
    line-height: 1;
}

.rpm-unit {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 500;
}

.engine-gauges {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.engine-gauge-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gauge-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}

.mini-gauge {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.mini-gauge-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gauge-value {
    font-size: 13px;
    color: white;
    font-weight: 600;
}
