/* ==========================================================
   FIBER LOCATOR RC-1.3
   Unified Enterprise Design System (KMZ Style)
========================================================== */

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

body { 
    font-family: Arial, Helvetica, sans-serif; /* Disamakan dengan font KMZ */
    background: #f4f6f9; 
    color: #333; 
    font-size: 12px; 
}

/* ==========================================================
   HEADER (Diseragamkan dengan biru KMZ)
========================================================== */
.header {
    background: #1554a5;
    color: #fff;
    padding: 18px 20px;
    border-radius: 8px;
    margin: 16px 16px 0 16px;
    display: block;
    text-align: left;
}
.header h1 { 
    font-size: 20px; 
    margin: 0; 
    color: #fff; 
}
.header p { 
    display: none; /* Disembunyikan agar bersih seperti halaman lain */
}

/* ==========================================================
   MAIN LAYOUT (Grid 320px)
========================================================== */
.dashboard {
    display: grid;
    grid-template-columns: 320px 1fr; /* Lebar form kiri disamakan: 320px */
    gap: 14px;
    padding: 16px;
    align-items: start;
}

/* ==========================================================
   CARDS & PANELS (Kotak Putih Premium)
========================================================== */
.panel, .map-panel, .card {
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    border: 1px solid transparent;
    margin-bottom: 0;
}
.input-panel {
    position: sticky;
    top: 16px;
}
.map-panel {
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* ==========================================================
   FORM & INPUTS
========================================================== */
label {
    display: block;
    margin: 8px 0 4px;
    font-weight: bold;
    font-size: 11px;
    color: #555;
}
input, select {
    width: 100%;
    height: 36px;
    padding: 0 9px;
    font-size: 12px;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    box-sizing: border-box;
}
input:focus, select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,.10);
}
button {
    width: 100%;
    height: 36px;
    margin-top: 16px;
    background: #1554a5;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
button:hover { background: #1976d2; }
button:disabled { background: #bdbdbd; cursor: not-allowed; }

/* ==========================================================
   PREDICTION RESULT METRICS
========================================================== */
.metric {
    font-size: 28px;
    font-weight: bold;
    color: #00a651;
    margin-bottom: 4px;
}
.label {
    color: #555;
    font-weight: bold;
    font-size: 12px;
}
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}
/* Mengubah kotak abu-abu gelap menjadi kartu putih dengan lis border */
.grid div {
    background: #fff;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    border-left: 4px solid #1554a5;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ==========================================================
   ASSET & HISTORY LIST
========================================================== */
.asset, .history {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #1554a5;
    padding: 10px 12px;
    margin-top: 0;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: .15s;
}
.asset:hover, .history:hover {
    background: #eef5ff;
}
.asset-title, .history-title {
    color: #1554a5;
    font-weight: bold;
    font-size: 12px;
}
.asset-sub, .history-sub {
    color: #555;
    font-size: 11px;
    margin-top: 4px;
}
.asset-distance, .history-distance {
    color: #00a651;
    font-size: 11px;
    font-weight: bold;
    margin-top: 4px;
}
.asset span { color: #1976d2; }
.empty { color: #777; font-size: 13px; text-align: center; padding: 40px; }
.section-subtitle { margin-top: -4px; margin-bottom: 12px; color: #777; font-size: 12px; }

/* ==========================================================
   PREMIUM ACTION BUTTONS (Map & Repair)
========================================================== */
.action-button {
    display: flex;
    flex-direction: row;
    gap: 14px;
    margin-top: 14px;
}

/* Tombol Open Google Map (Biru Korporat Elegan) */
.map {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff !important;
    background: #1554a5 !important;
    text-decoration: none;
    flex: 1;
    box-shadow: 0 2px 5px rgba(21,84,165,.2);
    transition: background .2s ease;
}
.map:hover {
    background: #10417f !important;
}

/* Tombol Create Repair Report (Oranye Premium / Amber) */
.repair {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff !important;
    background: #d97706 !important;
    text-decoration: none;
    flex: 1;
    box-shadow: 0 2px 5px rgba(217,119,6,+.2);
    transition: background .2s ease;
}
.repair:hover {
    background: #b45309 !important;
}



/* ==========================================================
   MAP PANEL
========================================================== */
#fiberMap {
    width: 100%;
    min-height: 500px;
    height: 60vh;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #E5E7EB;
}

/* ==========================================================
   MARKERS (Animasi detak dipertahankan)
========================================================== */
.asset-marker, .history-marker, .fault-marker { background: transparent; }
.pulse-marker {
    width: 22px; height: 22px; background: #d32f2f;
    border: 4px solid white; border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(211,47,47,.20), 0 8px 18px rgba(0,0,0,.35);
    animation: faultPulse 2s infinite;
}
@keyframes faultPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width:768px) {
    .dashboard { grid-template-columns: 1fr; padding: 8px; }
    .header { margin: 8px 8px 0 8px; }
    .input-panel { position: static; }
    #fiberMap { min-height: 400px; height: 50vh; }
}

/* ==========================================================
   MULTI-COLUMN LIST (Nearby Asset & Fault History)
========================================================== */
.list-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Membelah jadi 2 kolom */
    gap: 20px;
    margin-top: 16px;
    align-items: start;
}

/* Memadatkan kotak list agar tidak boros tempat */
.asset, .history {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #1554a5;
    padding: 8px 12px; /* Jarak atas-bawah dipangkas jadi 8px */
    margin-top: 0;
    margin-bottom: 8px; /* Jarak antar kotak dirapatkan */
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: .15s;
}