      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        overflow-x: hidden;
      }

      /* Header */
      .header {
        background: linear-gradient(135deg, #0369a1 0%, #0c4a6e 100%);
        color: white;
        padding: 15px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 1000;
      }

      .header h1 {
        font-size: 24px;
        margin-bottom: 5px;
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .header .subtitle {
        font-size: 14px;
        opacity: 0.9;
      }

      .status-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.1);
        padding: 8px 15px;
        border-radius: 8px;
        margin-top: 10px;
        font-size: 12px;
      }

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

      .status-indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        animation: pulse 2s infinite;
      }

      .status-indicator.normal {
        background: #22c55e;
      }
      .status-indicator.siaga {
        background: #eab308;
      }
      .status-indicator.waspada {
        background: #f97316;
      }
      .status-indicator.bahaya {
        background: #ef4444;
      }

      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
          transform: scale(1);
        }
        50% {
          opacity: 0.7;
          transform: scale(1.2);
        }
      }

      /* Main Container */
      .main-container {
        display: grid;
        grid-template-columns: 550px 1fr 420px;
        gap: 15px;
        padding: 15px;
        height: calc(100vh - 120px);
      }

      /* Left Panel - Control & Alert */
      .left-panel {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        padding: 15px;
      }

      /* Two Column Layout for Nowcast */
      .nowcast-two-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }

      .nowcast-column {
        min-width: 0; /* Prevent overflow */
      }

      /* Adjust chart containers in two-column layout */
      .nowcast-two-column .chart-container {
        margin-bottom: 10px;
      }

      .nowcast-two-column .chart-title {
        font-size: 12px;
      }

      .nowcast-two-column .pda-item {
        padding: 8px;
      }

      .nowcast-two-column .pda-item > div:first-child > div:first-child {
        font-size: 11px;
      }

      .nowcast-two-column .pda-item > div:nth-child(2) {
        font-size: 10px;
      }

      .nowcast-two-column .pda-item > div:nth-child(3) {
        font-size: 9px;
      }

      .panel-section {
        margin-bottom: 20px;
      }

      .panel-title {
        font-size: 16px;
        font-weight: bold;
        color: #1e3c72;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 2px solid #667eea;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .forecast-update {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 15px;
      }

      .forecast-update .time {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
      }

      .forecast-update .label {
        font-size: 11px;
        opacity: 0.9;
      }

      .forecast-mode {
        display: flex;
        gap: 8px;
        margin-bottom: 15px;
      }

      .mode-btn {
        flex: 1;
        padding: 10px;
        border: 2px solid #0891b2;
        background: white;
        color: #0891b2;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        font-size: 12px;
        transition: all 0.3s;
      }

      .mode-btn.active {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
        border-color: transparent;
      }

      .mode-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(8, 145, 178, 0.3);
      }

      /* Alert Cards */
      .alert-card {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 10px;
        animation: alertPulse 2s infinite;
      }

      .alert-card.warning {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
      }

      .alert-card.caution {
        background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
      }

      @keyframes alertPulse {
        0%,
        100% {
          box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
        }
        50% {
          box-shadow: 0 0 40px rgba(239, 68, 68, 0.8);
        }
      }

      .alert-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
      }

      .alert-icon {
        font-size: 24px;
      }

      .alert-time {
        font-size: 11px;
        opacity: 0.9;
      }

      .alert-message {
        font-size: 13px;
        font-weight: bold;
        margin-bottom: 5px;
      }

      .alert-detail {
        font-size: 11px;
        opacity: 0.9;
      }

      /* Station Status List */
      .station-list {
        max-height: 400px;
        overflow-y: auto;
      }

      .station-item {
        background: #f8f9fa;
        padding: 10px;
        border-radius: 6px;
        margin-bottom: 8px;
        border-left: 4px solid #22c55e;
        cursor: pointer;
        transition: all 0.3s;
      }

      .station-item:hover {
        background: #e9ecef;
        transform: translateX(5px);
      }

      .station-item.bahaya {
        border-left-color: #ef4444;
      }
      .station-item.waspada {
        border-left-color: #f97316;
      }
      .station-item.siaga {
        border-left-color: #eab308;
      }

      .station-name {
        font-weight: bold;
        font-size: 13px;
        margin-bottom: 5px;
      }

      .station-data {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: #666;
      }

      /* Center Panel - Map & Visualization */
      .center-panel {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }

      .map-tabs {
        display: flex;
        background: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
      }

      .tab-btn {
        flex: 1;
        padding: 12px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-weight: bold;
        color: #666;
        transition: all 0.3s;
        position: relative;
      }

      .tab-btn.active {
        color: #667eea;
        background: white;
      }

      .tab-btn.active::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, #0891b2, #0e7490);
      }

      .tab-content {
        flex: 1;
        position: relative;
        display: none;
      }

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

      #rainfallMap,
      #floodMap,
      #evacuationMap {
        width: 100%;
        height: 100%;
        position: relative;
      }

      .map-overlay {
        position: absolute;
        top: 10px;
        left: 10px;
        background: rgba(255, 255, 255, 0.95);
        padding: 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        max-width: 250px;
      }

      /* Position map-overlay at bottom left for flood tab */
      #floodTab .map-overlay {
        top: auto;
        bottom: 10px;
        left: 10px;
      }

      .overlay-title {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 8px;
        color: #1e3c72;
      }

      .overlay-item {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        font-size: 12px;
      }

      .color-box {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, 0.2);
      }

      /* Right Panel - Response & Action */
      .right-panel {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        padding: 15px;
      }

      .action-section {
        margin-bottom: 20px;
      }

      .action-card {
        background: #f8f9fa;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 10px;
        border: 2px solid transparent;
        transition: all 0.3s;
      }

      .action-card.active {
        border-color: #667eea;
        background: #eff6ff;
      }

      .action-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
      }

      .action-title {
        font-weight: bold;
        font-size: 13px;
        color: #1e3c72;
      }

      .action-status {
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: bold;
      }

      .action-status.pending {
        background: #fef3c7;
        color: #92400e;
      }

      .action-status.inprogress {
        background: #dbeafe;
        color: #1e40af;
      }

      .action-status.completed {
        background: #d1fae5;
        color: #065f46;
      }

      .action-detail {
        font-size: 12px;
        color: #666;
        margin-bottom: 8px;
      }

      .action-btn {
        width: 100%;
        padding: 8px;
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
        font-size: 12px;
        transition: all 0.3s;
      }

      .action-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
      }

      .action-btn.danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
      }

      /* Mobile Pump Status */
      .pump-status {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
      }

      .pump-item {
        background: white;
        border: 2px solid #e5e7eb;
        padding: 8px;
        border-radius: 6px;
        text-align: center;
      }

      .pump-item.active {
        border-color: #22c55e;
        background: #f0fdf4;
      }

      .pump-icon {
        font-size: 24px;
        margin-bottom: 4px;
      }

      .pump-label {
        font-size: 11px;
        font-weight: bold;
        color: #666;
      }

      /* Modal */
      .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 10000;
        align-items: center;
        justify-content: center;
      }

      .modal.active {
        display: flex;
      }

      .modal-content {
        background: white;
        border-radius: 12px;
        max-width: 600px;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
      }

      .modal-header {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
        padding: 15px 20px;
        border-radius: 12px 12px 0 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .modal-title {
        font-size: 18px;
        font-weight: bold;
      }

      .modal-close {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .modal-body {
        padding: 20px;
      }

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

      .form-label {
        display: block;
        font-weight: bold;
        margin-bottom: 5px;
        font-size: 13px;
        color: #333;
      }

      .form-control {
        width: 100%;
        padding: 10px;
        border: 2px solid #e5e7eb;
        border-radius: 6px;
        font-size: 13px;
        transition: all 0.3s;
      }

      .form-control:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
      }

      textarea.form-control {
        resize: vertical;
        min-height: 80px;
      }

      .form-btn {
        padding: 12px 24px;
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
        font-size: 14px;
        transition: all 0.3s;
      }

      .form-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
      }

      /* Command Modal Specific Styles */
      #commandModal .modal-content {
        max-width: 950px;
        max-height: 90vh;
      }

      #commandModal .modal-header {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
      }

      #commandModal .form-group {
        margin-bottom: 16px;
      }

      #commandModal .form-label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        color: #374151;
        font-size: 14px;
      }

      #commandModal input[type="checkbox"] {
        transform: scale(1.1);
        margin-right: 8px;
      }

      #commandModal input[type="checkbox"]:checked + span {
        color: #059669;
        font-weight: 600;
      }

      #commandModal textarea {
        resize: vertical;
        min-height: 80px;
      }

      #commandModal .form-control:focus {
        border-color: #dc2626;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
      }

      /* Priority color indicators */
      #commandModal select[id="commandPriority"] {
        background-image: linear-gradient(
          45deg,
          transparent 30%,
          rgba(220, 38, 38, 0.1) 70%
        );
      }

      /* Recipient summary styling */
      #recipientSummary {
        border-radius: 8px;
        padding: 10px;
        margin-top: 8px;
        font-size: 12px;
        transition: all 0.3s ease;
      }

      /* Template section styling */
      #commandTemplate {
        white-space: pre-wrap;
        font-family: "Courier New", monospace;
        font-size: 11px;
        line-height: 1.4;
        transition: all 0.3s ease;
      }

      #commandTemplate:hover {
        background: #fef3c7 !important;
        border-color: #f59e0b !important;
        transform: scale(1.01);
      }

      /* Form validation styling */
      #commandModal .form-control.invalid {
        border-color: #ef4444;
        background: #fef2f2;
      }

      #commandModal .form-control.valid {
        border-color: #10b981;
        background: #f0fdf4;
      }

      /* Button states */
      #submitCommandBtn:disabled {
        background: #9ca3af !important;
        cursor: not-allowed !important;
        transform: none !important;
        box-shadow: none !important;
      }

      #submitCommandBtn:not(:disabled) {
        background: linear-gradient(
          135deg,
          #dc2626 0%,
          #b91c1c 100%
        ) !important;
        animation: pulse 2s infinite;
      }

      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
        }
        50% {
          opacity: 0.8;
        }
      }

      /* Grid layouts for command form */
      #commandModal .grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
      }

      #commandModal .grid-3 {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
      }

      /* Early Release Modal Specific Styles */
      #earlyReleaseModal .modal-content {
        max-width: 1100px;
        max-height: 92vh;
      }

      #earlyReleaseModal .modal-header {
        background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
      }

      #earlyReleaseModal .form-group {
        margin-bottom: 18px;
      }

      #earlyReleaseModal .form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #374151;
        font-size: 14px;
      }

      /* Comprehensive 5-Gate Scheduling Modal Styles */
      #scheduleModal .modal-content {
        max-width: 1200px;
        max-height: 95vh;
        overflow-y: auto;
      }

      #scheduleModal .modal-header {
        background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
        position: sticky;
        top: 0;
        z-index: 1000;
      }

      /* Gate Selection Overview */
      .gate-selection-overview {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
      }

      .gates-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
        margin: 15px 0;
      }

      .gate-status-card {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        padding: 12px 8px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        position: relative;
      }

      .gate-status-card:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      }

      .gate-status-card[data-gate="1"] {
        border-top: 3px solid #22c55e;
      }
      .gate-status-card[data-gate="2"] {
        border-top: 3px solid #3b82f6;
      }
      .gate-status-card[data-gate="3"] {
        border-top: 3px solid #f97316;
      }
      .gate-status-card[data-gate="4"] {
        border-top: 3px solid #6366f1;
      }
      .gate-status-card[data-gate="5"] {
        border-top: 3px solid #ec4899;
      }

      .gate-number {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
      }

      .gate-volume {
        font-size: 11px;
        opacity: 0.9;
        margin-bottom: 3px;
      }

      .gate-efficiency {
        font-size: 10px;
        background: rgba(255, 255, 255, 0.2);
        padding: 2px 6px;
        border-radius: 10px;
      }

      /* Individual Gate Scheduling Section */
      .gate-schedule-section {
        background: #f8fafc;
        border-radius: 10px;
        padding: 20px;
        margin: 15px 0;
        border-left: 4px solid #4f46e5;
      }

      .gate-schedule-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #e2e8f0;
      }

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

      .gate-schedule-actions button {
        padding: 6px 12px;
        font-size: 12px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 500;
      }

      .btn-optimize {
        background: linear-gradient(45deg, #06b6d4, #0891b2);
        color: white;
      }

      .btn-copy {
        background: linear-gradient(45deg, #8b5cf6, #7c3aed);
        color: white;
      }

      .gate-schedule-info {
        background: linear-gradient(45deg, #f0fdf4, #dcfce7);
        padding: 10px;
        border-radius: 6px;
        font-size: 12px;
        color: #166534;
        margin-bottom: 15px;
        border: 1px solid #bbf7d0;
      }

      /* 3-Day Planning Grid */
      .day-planning-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin-bottom: 20px;
      }

      .day-card {
        background: white;
        padding: 15px;
        border-radius: 8px;
        border: 2px solid #e5e7eb;
        transition: all 0.3s;
      }

      .day-card:hover {
        border-color: #4f46e5;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
      }

      .day-header {
        font-weight: bold;
        color: #374151;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .day-number {
        background: linear-gradient(45deg, #4f46e5, #6366f1);
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
      }

      /* Overall Summary Section */
      .overall-summary {
        background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
        color: white;
        padding: 20px;
        border-radius: 10px;
        margin: 20px 0;
      }

      .summary-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        margin-top: 15px;
      }

      .summary-gate-card {
        background: rgba(255, 255, 255, 0.1);
        padding: 12px;
        border-radius: 8px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
      }

      .summary-gate-number {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 5px;
      }

      .summary-volume {
        font-size: 12px;
        opacity: 0.9;
        margin-bottom: 3px;
      }

      .summary-efficiency {
        font-size: 11px;
        background: rgba(34, 197, 94, 0.3);
        color: #22c55e;
        padding: 2px 6px;
        border-radius: 10px;
      }

      .summary-totals {
        display: flex;
        justify-content: space-around;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
      }

      .total-metric {
        text-align: center;
      }

      .metric-value {
        font-size: 24px;
        font-weight: bold;
        display: block;
      }

      .metric-label {
        font-size: 12px;
        opacity: 0.8;
      }

      /* Schedule Day Cards */
      .schedule-day-card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
      }

      .schedule-day-card::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(
          circle,
          rgba(255, 255, 255, 0.1) 0%,
          transparent 70%
        );
        opacity: 0;
        transition: opacity 0.3s ease;
      }

      .schedule-day-card:hover::before {
        opacity: 1;
      }

      .schedule-day-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
          0 10px 10px -5px rgba(0, 0, 0, 0.04);
      }

      /* Schedule Timeline Visual */
      #scheduleTimeline {
        background: linear-gradient(
          45deg,
          #f8fafc 0%,
          #ffffff 50%,
          #f1f5f9 100%
        );
        border: 2px solid transparent;
        background-clip: padding-box;
        position: relative;
      }

      #scheduleTimeline::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, #eab308, #f59e0b, #d97706);
        z-index: -1;
        border-radius: 8px;
      }

      /* Priority Badges */
      select[id*="priority"] option[value="tinggi"] {
        background-color: #fef2f2;
        color: #dc2626;
      }

      select[id*="priority"] option[value="sedang"] {
        background-color: #fef3c7;
        color: #d97706;
      }

      select[id*="priority"] option[value="rendah"] {
        background-color: #f0fdf4;
        color: #16a34a;
      }

      /* Animated Status Indicators */
      .schedule-day-card button[onclick*="toggleDayStatus"] {
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
      }

      .schedule-day-card button[onclick*="toggleDayStatus"]:before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
      }

      .schedule-day-card button[onclick*="toggleDayStatus"]:active:before {
        width: 300px;
        height: 300px;
      }

      /* Resource Allocation Cards */
      .schedule-day-card input[type="checkbox"] {
        appearance: none;
        width: 16px;
        height: 16px;
        border: 2px solid #d1d5db;
        border-radius: 3px;
        background-color: #ffffff;
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
      }

      .schedule-day-card input[type="checkbox"]:checked {
        background-color: #22c55e;
        border-color: #16a34a;
        transform: scale(1.1);
      }

      .schedule-day-card input[type="checkbox"]:checked::after {
        content: "✓";
        position: absolute;
        top: -2px;
        left: 1px;
        color: white;
        font-size: 12px;
        font-weight: bold;
      }

      /* Timeline Bar Animation */
      @keyframes timelineGlow {
        0%,
        100% {
          box-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
        }
        50% {
          box-shadow: 0 0 20px rgba(34, 197, 94, 0.6),
            0 0 30px rgba(34, 197, 94, 0.4);
        }
      }

      .schedule-day-card[data-day="0"] {
        animation: timelineGlow 3s ease-in-out infinite;
      }

      /* Quick Actions Buttons */
      .schedule-day-card button[onclick*="optimize"],
      .schedule-day-card button[onclick*="toggleDayStatus"] {
        background: linear-gradient(
          135deg,
          var(--btn-bg) 0%,
          var(--btn-bg-dark) 100%
        );
        border: none;
        border-radius: 6px;
        color: white;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.025em;
        transition: all 0.2s ease;
        position: relative;
        overflow: hidden;
      }

      .schedule-day-card button[onclick*="optimize"]:hover,
      .schedule-day-card button[onclick*="toggleDayStatus"]:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      }

      /* Risk Analysis Section */
      .risk-analysis-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
        margin-bottom: 15px;
      }

      .risk-item {
        padding: 8px;
        border-radius: 6px;
        font-size: 10px;
        line-height: 1.3;
        transition: transform 0.2s ease;
      }

      .risk-item:hover {
        transform: scale(1.02);
      }

      /* Progress Indicators */
      .efficiency-indicator {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 10px;
        font-weight: bold;
        margin-left: 5px;
      }

      .efficiency-high {
        background: #dcfce7;
        color: #166534;
      }
      .efficiency-medium {
        background: #fef3c7;
        color: #92400e;
      }
      .efficiency-low {
        background: #fee2e2;
        color: #991b1b;
      }

      /* Form Controls Enhancement */
      #scheduleModal .form-control {
        border: 2px solid #e5e7eb;
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 12px;
        transition: all 0.3s ease;
        background: white;
      }

      #scheduleModal .form-control:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        outline: none;
        background: #fafbff;
      }

      #scheduleModal select.form-control option {
        padding: 8px;
        font-size: 12px;
      }

      /* Responsive Design */
      @media (max-width: 1024px) {
        #scheduleModal .modal-content {
          max-width: 95vw;
          margin: 10px;
        }

        .schedule-day-card {
          min-width: 100%;
        }
      }

      @media (max-width: 768px) {
        #scheduleModal .modal-body > div[style*="grid-template-columns"] {
          grid-template-columns: 1fr !important;
        }

        .schedule-day-card h4 {
          font-size: 12px;
        }
      }

      /* Floating Action Styles */
      .floating-metrics {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        z-index: 100;
        margin-bottom: 15px;
        border: 1px solid rgba(0, 0, 0, 0.1);
      }

      /* Success/Error States */
      .validation-success {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 2px solid #22c55e;
      }

      .validation-warning {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border: 2px solid #f59e0b;
      }

      .validation-error {
        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
        border: 2px solid #ef4444;
      }

      /* Loading States */
      .loading-shimmer {
        background: linear-gradient(
          90deg,
          #f3f4f6 25%,
          #e5e7eb 50%,
          #f3f4f6 75%
        );
        background-size: 200% 100%;
        animation: shimmer 2s infinite;
      }

      @keyframes shimmer {
        0% {
          background-position: 200% 0;
        }
        100% {
          background-position: -200% 0;
        }
      }

      /* Tidal prediction section */
      .tidal-prediction-section {
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border: 2px solid #0ea5e9;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        position: relative;
      }

      .tidal-prediction-section::before {
        content: "";
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, #0ea5e9, #06b6d4, #0891b2);
        border-radius: 12px;
        z-index: -1;
        opacity: 0.3;
        animation: tidalGlow 3s ease-in-out infinite alternate;
      }

      @keyframes tidalGlow {
        0% {
          opacity: 0.2;
        }
        100% {
          opacity: 0.5;
        }
      }

      /* Tidal chart styling */
      .tidal-chart {
        background: linear-gradient(
          to bottom,
          #fee2e2 0%,
          #dbeafe 40%,
          #dcfce7 100%
        );
        border-radius: 8px;
        position: relative;
        overflow: hidden;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
      }

      /* Status indicators */
      .status-optimal {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        border: 2px solid #16a34a;
        color: #15803d;
        animation: optimalPulse 2s ease-in-out infinite alternate;
      }

      .status-suboptimal {
        background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
        border: 2px solid #f59e0b;
        color: #92400e;
      }

      @keyframes optimalPulse {
        0% {
          box-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
        }
        100% {
          box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
        }
      }

      /* Configuration panels */
      .config-panel {
        background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
        border: 1px solid #eab308;
        border-radius: 8px;
        padding: 12px;
        position: relative;
      }

      .impact-panel {
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border: 1px solid #0284c7;
        border-radius: 8px;
        padding: 12px;
      }

      /* Risk assessment colors */
      .risk-high {
        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
        border: 1px solid #ef4444;
        color: #7f1d1d;
      }

      .risk-medium {
        background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
        border: 1px solid #f59e0b;
        color: #92400e;
      }

      .risk-low {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 1px solid #22c55e;
        color: #14532d;
      }

      /* Checklist styling */
      #earlyReleaseModal input[type="checkbox"] {
        transform: scale(1.2);
        margin-right: 8px;
        cursor: pointer;
      }

      #earlyReleaseModal input[type="checkbox"]:checked + span {
        color: #059669;
        font-weight: 600;
        text-decoration: line-through;
      }

      /* Button enhancements */
      #earlyReleaseModal .form-btn {
        transition: all 0.3s ease;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      }

      #earlyReleaseModal .form-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
      }

      #submitEarlyReleaseBtn {
        background: linear-gradient(
          135deg,
          #dc2626 0%,
          #b91c1c 100%
        ) !important;
        border: 2px solid #991b1b;
        animation: releaseButtonPulse 2s infinite;
      }

      @keyframes releaseButtonPulse {
        0%,
        100% {
          box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
          transform: scale(1);
        }
        50% {
          box-shadow: 0 6px 25px rgba(220, 38, 38, 0.6);
          transform: scale(1.02);
        }
      }

      /* Metrics display */
      .metrics-display {
        background: white;
        border-radius: 6px;
        padding: 10px;
        border: 1px solid #d97706;
        font-family: "Courier New", monospace;
      }

      /* Contingency section */
      .contingency-section {
        background: linear-gradient(135deg, #fef7ff 0%, #fae8ff 100%);
        border: 1px solid #a855f7;
        border-radius: 8px;
        padding: 15px;
      }

      /* Progress indicators */
      .progress-bar {
        width: 100%;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        overflow: hidden;
        margin: 8px 0;
      }

      .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #10b981, #059669);
        border-radius: 3px;
        transition: width 0.3s ease;
      }

      /* Responsive adjustments */
      @media (max-width: 768px) {
        #commandModal .modal-content {
          max-width: 95%;
          margin: 10px;
        }

        #commandModal .grid-2,
        #commandModal .grid-3 {
          grid-template-columns: 1fr;
        }

        #commandModal .form-label {
          font-size: 12px;
        }

        #commandModal .form-control {
          font-size: 12px;
        }

        #earlyReleaseModal .modal-content {
          max-width: 95%;
          margin: 5px;
        }

        #earlyReleaseModal .tidal-chart {
          height: 80px;
        }

        #earlyReleaseModal .config-panel,
        #earlyReleaseModal .impact-panel {
          margin-bottom: 10px;
        }
      }

      /* Tidal Modal Specific Styles */
      #tidalModal .modal-content {
        max-width: 1200px;
        max-height: 95vh;
      }

      #tidalModal .modal-header {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
      }

      #tidalModal .form-group {
        margin-bottom: 20px;
      }

      #tidalModal .form-label {
        display: block;
        margin-bottom: 10px;
        font-weight: 600;
        color: #1e293b;
        font-size: 15px;
      }

      /* Tidal Station Cards */
      .tidal-station {
        transition: all 0.3s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
      }

      .tidal-station:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
      }

      .tidal-station::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.4),
          transparent
        );
        transition: left 0.5s;
      }

      .tidal-station:hover::before {
        left: 100%;
      }

      /* Station status indicators */
      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
          transform: scale(1);
        }
        50% {
          opacity: 0.7;
          transform: scale(1.1);
        }
      }

      /* Chart controls */
      .chart-btn {
        transition: all 0.3s ease;
        font-weight: 600;
      }

      .chart-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      }

      .chart-btn.active {
        background: #3b82f6 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
      }

      /* Tidal chart enhancements */
      #tidalChartContainer {
        position: relative;
        background: linear-gradient(
          to bottom,
          #fee2e2 0%,
          /* High tide - light red */ #dbeafe 30%,
          /* Medium-high - light blue */ #dcfce7 70%,
          /* Medium-low - light green */ #f0fdf4 100%
            /* Low tide - lightest green */
        );
        border-radius: 12px;
        overflow: hidden;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
      }

      #tidalChartContainer svg {
        transition: opacity 0.3s ease;
      }

      /* Selected station details */
      #selectedStationDetails {
        transition: all 0.3s ease;
        min-height: 200px;
      }

      /* Prediction panels */
      #tidalPredictions {
        max-height: 400px;
        overflow-y: auto;
      }

      #tidalPredictions::-webkit-scrollbar {
        width: 6px;
      }

      #tidalPredictions::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
      }

      #tidalPredictions::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
      }

      #tidalPredictions::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
      }

      /* Station color themes */
      .station-1-theme {
        background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
        border-color: #0277bd;
      }

      .station-2-theme {
        background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
        border-color: #7b1fa2;
      }

      .station-3-theme {
        background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
        border-color: #ef6c00;
      }

      /* Operational analysis panel */
      .operational-analysis {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 2px solid #22c55e;
        border-radius: 12px;
        position: relative;
      }

      .operational-analysis::before {
        content: "";
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, #22c55e, #16a34a, #15803d);
        border-radius: 12px;
        z-index: -1;
        opacity: 0.3;
        animation: borderGlow 3s ease-in-out infinite alternate;
      }

      @keyframes borderGlow {
        0% {
          opacity: 0.2;
        }
        100% {
          opacity: 0.5;
        }
      }

      /* Responsive adjustments for tidal modal */
      @media (max-width: 768px) {
        #tidalModal .modal-content {
          max-width: 95%;
          margin: 10px;
        }

        .tidal-station {
          padding: 10px;
        }

        #tidalChartContainer {
          height: 200px;
        }

        .chart-btn {
          padding: 4px 8px;
          font-size: 10px;
        }

        #selectedStationDetails {
          min-height: 150px;
        }
      }

      /* Mobile Pump Modal Enhancements */
      #mobilePumpModal .form-group {
        position: relative;
      }

      #mobilePumpModal .form-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        margin-bottom: 8px;
      }

      #mobilePumpModal select.form-control {
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        padding: 12px;
        font-size: 13px;
      }

      #mobilePumpModal select.form-control:focus {
        background: white;
        border-color: #0891b2;
        box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
      }

      #mobilePumpModal .priority-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        display: inline-block;
        margin-right: 6px;
      }

      /* Timeline */
      .timeline {
        position: relative;
        padding-left: 30px;
      }

      .timeline::before {
        content: "";
        position: absolute;
        left: 8px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #e5e7eb;
      }

      .timeline-item {
        position: relative;
        margin-bottom: 20px;
      }

      .timeline-dot {
        position: absolute;
        left: -26px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #667eea;
        border: 3px solid white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
      }

      .timeline-content {
        background: #f8f9fa;
        padding: 10px;
        border-radius: 6px;
      }

      .timeline-time {
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
      }

      .timeline-text {
        font-size: 12px;
        color: #333;
      }

      /* Scrollbar */
      ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
      }

      ::-webkit-scrollbar-track {
        background: #f1f1f1;
      }

      ::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
      }

      ::-webkit-scrollbar-thumb:hover {
        background: #555;
      }

      /* Chart Container */
      .chart-container {
        background: white;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      }

      .chart-title {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 10px;
        color: #1e3c72;
      }

      /* Hydrograph Chart Wrapper */
      .hydrograph-wrapper {
        position: relative;
        width: 100%;
        height: 300px;
        margin-bottom: 10px;
      }

      #hydrographChart {
        width: 100% !important;
        height: 100% !important;
      }

      /* PDA Status Animations */
      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
        }
        50% {
          opacity: 0.6;
        }
      }

      .pda-item {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
      }

      .pda-item:hover {
        transform: translateX(3px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      }

      /* Floating Navigation for Rainfall Distribution */
      .interpolation-panel {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 12px 15px;
        z-index: 1000;
        max-width: 90%;
        display: flex;
        align-items: center;
        gap: 15px;
      }

      .interpolation-title {
        font-size: 13px;
        font-weight: bold;
        color: #333;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        padding: 8px 15px;
        padding-right: 15px;
        border-right: 2px solid #007bff;
        cursor: pointer;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        user-select: none;
      }

      .interpolation-title:hover {
        background: linear-gradient(135deg, #56ccf2, #2f80ed);
        color: white;
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(86, 204, 242, 0.3);
      }

      .interpolation-title.isohyet-hidden {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: white;
      }

      .interpolation-title.isohyet-hidden:hover {
        background: linear-gradient(135deg, #c0392b, #e74c3c);
      }

      .interpolation-title .toggle-icon {
        font-size: 10px;
        margin-left: 3px;
      }

      .interpolation-buttons-wrapper {
        position: relative;
        overflow: hidden;
        flex: 1;
        max-width: 600px;
      }

      .interpolation-buttons {
        display: flex;
        gap: 8px;
        transition: transform 0.3s ease;
        overflow-x: auto;
        scroll-behavior: smooth;
      }

      .interpolation-buttons::-webkit-scrollbar {
        display: none;
      }

      .time-filter-btn {
        padding: 8px 16px;
        border: 1px solid #dee2e6;
        background: white;
        border-radius: 8px;
        cursor: pointer;
        font-size: 11px;
        font-weight: 500;
        color: #495057;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        flex-shrink: 0;
      }

      .time-filter-btn:hover {
        background: linear-gradient(135deg, #e9ecef, #dee2e6);
        border-color: #007bff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
      }

      .time-filter-btn.active {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        border-color: #0056b3;
        font-weight: bold;
      }

      .time-filter-btn .time-icon {
        font-size: 14px;
      }

      .time-filter-btn .time-label {
        font-size: 11px;
      }

      .slide-btn {
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s ease;
        flex-shrink: 0;
      }

      .slide-btn:hover {
        background: #007bff;
        color: white;
        border-color: #007bff;
      }

      /* Layer Control Panel */
      .layer-control-panel {
        position: absolute;
        bottom: 10px;
        left: 10px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 12px;
        z-index: 1000;
        min-width: 200px;
      }

      .layer-control-title {
        font-size: 14px;
        font-weight: bold;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e9ecef;
      }

      .layer-control-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .layer-control-btn {
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 8px 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        color: #333;
      }

      .layer-control-btn:hover {
        background: #f8f9fa;
        border-color: #007bff;
        transform: translateX(2px);
      }

      .layer-control-btn.disabled {
        background: #f8f9fa;
        color: #6c757d;
        border-color: #dee2e6;
      }

      .layer-control-btn.disabled .toggle-status {
        opacity: 0.5;
      }

      .toggle-status {
        font-size: 14px;
        transition: all 0.3s ease;
      }

      /* Custom Zoom Controls */
      .custom-zoom-controls-ews {
        position: absolute;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
        overflow: hidden;
        width: 30px;
      }

      .custom-zoom-btn-ews {
        flex: 1;
        background: white;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: bold;
        color: #333;
        padding: 0;
        min-height: 34px;
        transition: background 0.2s;
      }

      .custom-zoom-btn-ews:last-child {
        border-bottom: none;
      }

      .custom-zoom-btn-ews:hover {
        background: #f4f4f4;
      }

      .custom-zoom-btn-ews:active {
        background: #e0e0e0;
      }

      /* Weather Icon Marker */
      .weather-icon-marker {
        background: transparent !important;
        border: none !important;
        transition: all 0.3s ease;
      }

      .weather-icon-marker:hover {
        transform: scale(1.2);
      }

      /* CSS untuk marker icons agar dapat menerima hover events */
      .pda-icon-marker,
      .weather-icon-marker {
        cursor: pointer;
        pointer-events: auto !important;
      }

      .pda-icon-marker div,
      .weather-icon-marker div {
        pointer-events: auto;
      }

      /* Custom Hover Popup Styles */
      .custom-hover-popup {
        position: fixed;
        background: linear-gradient(135deg, #ffffff, #f8f9fa);
        border: none;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        padding: 16px;
        z-index: 10000;
        min-width: 280px;
        max-width: min(420px, 90vw);
        width: max-content;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        opacity: 0;
        transform: translateY(10px) scale(0.95);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        will-change: transform, opacity;
        overflow: hidden;
        contain: layout style paint;
        transform-origin: bottom center;
      }

      .custom-hover-popup.pda {
        min-width: 320px;
        max-width: min(450px, 95vw);
      }

      .custom-hover-popup.show {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        visibility: visible;
        will-change: auto;
      }

      .custom-hover-popup::before {
        content: "";
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #ffffff;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
      }

      .custom-hover-popup.top::before {
        bottom: auto;
        top: -8px;
        border-top: none;
        border-bottom: 8px solid #ffffff;
      }

      .custom-hover-popup.top {
        transform-origin: top center;
      }

      .popup-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid rgba(0, 123, 255, 0.1);
      }

      .popup-icon {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        color: white;
        background: linear-gradient(135deg, #007bff, #0056b3);
      }

      .popup-title {
        font-size: 14px;
        font-weight: 600;
        color: #2c3e50;
        margin: 0;
        flex: 1;
      }

      .popup-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .popup-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
      }

      .popup-label {
        font-size: 12px;
        color: #6c757d;
        font-weight: 500;
      }

      .popup-value {
        font-size: 13px;
        color: #2c3e50;
        font-weight: 600;
      }

      .popup-value-warning {
        color: #f39c12 !important;
        font-weight: 700;
      }

      .popup-value-danger {
        color: #e74c3c !important;
        font-weight: 700;
      }

      .popup-status {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
      }

      .popup-status.aman {
        background: linear-gradient(135deg, #d4edda, #c3e6cb);
        color: #155724;
      }

      .popup-status.siaga {
        background: linear-gradient(135deg, #fff3cd, #ffeaa7);
        color: #856404;
      }

      .popup-status.waspada {
        background: linear-gradient(135deg, #f8d7da, #f5c6cb);
        color: #721c24;
      }

      .popup-status.bahaya {
        background: linear-gradient(135deg, #f8d7da, #dc3545);
        color: #ffffff;
      }

      .popup-coordinate {
        font-size: 11px;
        color: #999;
        text-align: center;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
      }

      /* Mobile responsive adjustments */
      /* Responsive breakpoints for popup */
      @media (max-width: 768px) {
        .custom-hover-popup {
          min-width: 260px;
          max-width: min(350px, 85vw);
          padding: 12px;
          font-size: 14px;
        }

        .custom-hover-popup.pda {
          min-width: 280px;
          max-width: min(380px, 90vw);
        }

        .popup-header-section {
          padding: 10px !important;
        }

        .modern-popup-container {
          font-size: 13px;
        }

        .popup-header {
          gap: 8px;
        }

        .popup-icon {
          width: 20px;
          height: 20px;
          font-size: 10px;
        }

        .popup-title {
          font-size: 13px;
        }

        .popup-label,
        .popup-value {
          font-size: 11px;
        }
      }

      /* Responsive Design for Main Layout */
      @media (max-width: 1400px) {
        .main-container {
          grid-template-columns: 480px 1fr 380px;
        }
      }

      @media (max-width: 1200px) {
        .main-container {
          grid-template-columns: 450px 1fr 350px;
        }
      }

      @media (max-width: 1024px) {
        .main-container {
          grid-template-columns: 400px 1fr 320px;
        }
      }

      @media (max-width: 768px) {
        .main-container {
          grid-template-columns: 1fr;
          grid-template-rows: auto auto auto;
          height: auto;
          gap: 10px;
        }

        .left-panel,
        .center-panel,
        .right-panel {
          height: auto;
          min-height: 400px;
        }
      }

      @media (max-width: 480px) {
        .custom-hover-popup {
          min-width: 240px;
          max-width: min(320px, 80vw);
          padding: 10px;
          font-size: 13px;
        }

        .custom-hover-popup.pda {
          min-width: 260px;
          max-width: min(340px, 85vw);
        }

        .popup-header-section {
          padding: 8px !important;
        }

        .modern-popup-container {
          font-size: 12px;
        }

        .popup-title {
          font-size: 12px;
        }

        .popup-label,
        .popup-value {
          font-size: 10px;
        }
      }

      /* Hover effects for map elements */
      .leaflet-interactive:hover {
        cursor: pointer;
        filter: brightness(1.1);
        transition: all 0.2s ease;
      }

      /* Isohyet Legend - Bottom Right */
      .isohyet-legend {
        position: absolute;
        bottom: 15px;
        right: 15px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        padding: 10px;
        z-index: 1000;
        min-width: 180px;
        transition: all 0.3s ease;
      }

      .isohyet-legend.hidden {
        transform: translateX(220px);
        opacity: 0;
        pointer-events: none;
      }

      .legend-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        padding-bottom: 6px;
        border-bottom: 2px solid #007bff;
      }

      .legend-title {
        font-size: 11px;
        font-weight: bold;
        color: #333;
        display: flex;
        align-items: center;
        gap: 4px;
      }

      .legend-toggle {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 16px;
        color: #666;
        padding: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
      }

      .legend-toggle:hover {
        color: #007bff;
        transform: scale(1.2);
      }

      .legend-items {
        display: flex;
        flex-direction: column;
        gap: 5px;
      }

      .legend-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 9px;
      }

      .legend-color-box {
        width: 35px;
        height: 16px;
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        flex-shrink: 0;
      }

      .legend-label {
        color: #495057;
        font-weight: 500;
      }

      .legend-value {
        color: #6c757d;
        font-size: 8px;
      }

      .legend-separator {
        height: 1px;
        background: linear-gradient(
          to right,
          transparent,
          #dee2e6,
          transparent
        );
        margin: 8px 0;
      }

      .legend-section {
        margin-bottom: 10px;
      }

      .legend-section:last-child {
        margin-bottom: 0;
      }

      .legend-section-title {
        font-size: 10px;
        font-weight: 600;
        color: #495057;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 4px;
      }

      .marker-legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 9px;
        margin-bottom: 4px;
      }

      .marker-legend-item:last-child {
        margin-bottom: 0;
      }

      .marker-icon-preview {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .marker-icon-preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }

      /* Show Legends Button */
      .legends-toggle-btn {
        position: absolute;
        bottom: 15px;
        right: 15px;
        background: linear-gradient(135deg, #56ccf2 0%, #2f80ed 100%);
        color: white;
        border: none;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        cursor: pointer;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
        box-shadow: 0 2px 8px rgba(86, 204, 242, 0.4);
        transition: all 0.3s ease;
      }

      .legends-toggle-btn.hidden {
        opacity: 0;
        pointer-events: none;
        transform: scale(0);
      }

      /* Schema Info Panel Styling */
      .schema-info-item {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        padding: 4px 0;
        transition: all 0.2s ease;
      }

      .schema-info-item:hover {
        background-color: rgba(40, 167, 69, 0.05);
        border-radius: 4px;
        padding-left: 4px;
      }

      .schema-info-label {
        font-weight: bold;
        margin-bottom: 3px;
        color: #495057;
        display: flex;
        align-items: center;
        gap: 4px;
      }

      .schema-info-value {
        color: #6c757d;
        font-size: 10px;
      }

      .schema-info-value.highlight {
        color: #28a745;
        font-weight: 600;
      }

      .schema-info-icon {
        font-size: 12px;
        width: 16px;
        text-align: center;
      }

      .legends-toggle-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(86, 204, 242, 0.6);
      }

      /* Timeline container with custom scrollbar - Modern minimalist design */
      .timeline-container {
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.4) transparent;
        scroll-behavior: smooth;
      }

      .timeline-container::-webkit-scrollbar {
        height: 4px;
      }

      .timeline-container::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 10px;
      }

      .timeline-container::-webkit-scrollbar-thumb {
        background: linear-gradient(
          90deg,
          rgba(156, 163, 175, 0.3),
          rgba(156, 163, 175, 0.5)
        );
        border-radius: 10px;
        transition: all 0.3s ease;
      }

      .timeline-container::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(
          90deg,
          rgba(107, 114, 128, 0.5),
          rgba(107, 114, 128, 0.7)
        );
      }

      /* Navigation Menu */
      .nav-menu {
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1001;
      }

      .nav-toggle {
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
      }

      .nav-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-1px);
      }

      .nav-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 8px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        overflow: hidden;
      }

      .nav-dropdown.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
      }

      .nav-item {
        display: block;
        padding: 12px 18px;
        color: #333;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .nav-item:last-child {
        border-bottom: none;
      }

      .nav-item:hover {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        color: white;
      }

      .nav-item.current {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        color: white;
        font-weight: 600;
      }

      .nav-item-icon {
        font-size: 16px;
        width: 20px;
        text-align: center;
      }
