/* =======================================================
   style.css - Desain Antarmuka Sistem Manajemen Aset
   ======================================================= */
body { background-color: #F8F9FA; font-family: 'Open Sans', sans-serif; overflow-x: hidden; transition: background-color 0.3s ease, color 0.3s ease; }

/* NAVBAR */
.navbar { background-color: rgba(255,255,255,0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; transition: background-color 0.3s ease; }
.nav-link { font-weight: 600; color: #333 !important; margin: 0 10px; }
.nav-link:hover, .nav-link.active { color: #005b9f !important; }
.btn-nav-primary { background-color: #005b9f !important; color: white !important; border-radius: 50px; padding: 8px 25px !important; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,91,159,0.2); }
.btn-nav-primary:hover { background-color: #00447a !important; transform: translateY(-2px); }

/* User Info Badge */
#nav-user-info { display: none; }
.user-badge { background: #f0f7ff; border: 1px solid #cce0f5; border-radius: 50px; padding: 6px 15px; display: flex; align-items: center; gap: 8px; }
.user-badge span { font-size: 13px; font-weight: 600; color: #005b9f; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* HERO */
.hero-section { height: 100vh; background: linear-gradient(rgba(0,59,111,0.8), rgba(0,30,60,0.9)), url('https://images.unsplash.com/photo-1565793298595-6a879b1d9492?q=80&w=1920&auto=format&fit=crop'); background-size: cover; background-position: center; background-attachment: fixed; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; text-align: center; position: relative; padding-top: 60px; }
.hero-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 3.5rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 20px; opacity: 0.9; }
.scroll-down { position: absolute; bottom: 30px; animation: bounce 2s infinite; color: white; text-decoration: none; opacity: 0.8; cursor: pointer; }
@keyframes bounce { 0%,20%,50%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-10px)} 60%{transform:translateY(-5px)} }

/* PROFIL */
#profil-section { padding: 100px 0; background-color: #fff; transition: background-color 0.3s ease; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { color: #005b9f; font-family: 'Montserrat', sans-serif; font-weight: 700; margin-bottom: 15px; letter-spacing: 1px; }
.section-header .line { width: 80px; height: 4px; background: #00ADB5; margin: 0 auto; border-radius: 2px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); background: #000; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* DASHBOARD & MAP */
#dashboard-area { padding: 80px 0 40px 0; background-color: #fff; border-top: 1px solid #eee; transition: background-color 0.3s ease; }
#map { height: 750px; width: 100%; border-radius: 12px; border: 2px solid #ccc; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: filter 0.3s ease; }

/* CONTROLS PETA (TABS) */
.leaflet-top .leaflet-control { margin-top: 10px; margin-bottom: 0; }
.custom-map-control { background: rgba(255,255,255,0.95); backdrop-filter: blur(5px); padding: 15px; border-radius: 8px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important; border: none !important; width: 340px; max-width: calc(100vw - 30px); margin-left: 10px !important; margin-bottom: 10px !important; clear: both; transition: all 0.3s ease; }
.nav-pills .nav-link { color: #555; border-radius: 6px; padding: 8px; transition: 0.3s; cursor: pointer; }
.nav-pills .nav-link.active { background-color: #005b9f; color: white !important; box-shadow: 0 2px 5px rgba(0,91,159,0.3); }

/* HASIL PENCARIAN CUSTOM */
.search-result-box { max-height: 180px; overflow-y: auto; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

/* POPUP & LABEL */
.leaflet-popup-content-wrapper { border-radius: 8px; }
.leaflet-popup-content { margin: 10px; min-width: 200px; }
.table-popup th { width: 35%; background-color: #f8f9fa; font-size: 11px; }
.table-popup td { font-size: 11px; }
.kavling-label-tooltip { background-color: rgba(255,255,255,0.85); border: 1px solid #005b9f; border-radius: 6px; padding: 4px 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); pointer-events: none; transition: background 0.3s; }

/* MODAL TABLE ATRIBUT */
.table-container { max-height: 60vh; overflow-y: auto; overflow-x: auto; }
.table-container table { min-width: 100%; border-collapse: collapse; }
.table-container th { position: sticky; top: 0; background-color: #005b9f; color: white; z-index: 2; font-size: 11px; text-transform: uppercase; white-space: nowrap; vertical-align: middle !important; padding: 10px !important;}
.table-container td { font-size: 11px; white-space: nowrap; vertical-align: middle !important; padding: 8px 10px !important; }
.col-aksi { width: 140px; min-width: 140px; max-width: 140px; text-align: center; }
.col-no { width: 50px; min-width: 50px; text-align: center; }

/* LOADING OVERLAY */
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,30,60,0.92); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; }
#loading-overlay .spinner-border { width: 3rem; height: 3rem; }

/* Trik Transparansi AutoCAD */
.tiles-autocad-layer { mix-blend-mode: multiply; filter: brightness(1.1) contrast(1.2); }

/* FLOATING CHATBOT AI UI */
.chatbot-toggler { position: fixed; bottom: 30px; right: 30px; width: 55px; height: 55px; border-radius: 50%; background-color: #005b9f; color: white; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.25); cursor: pointer; z-index: 9998; display: flex; justify-content: center; align-items: center; font-size: 24px; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chatbot-toggler:hover { transform: scale(1.1); background-color: #00447a; }
.chatbot-window { position: fixed; bottom: 100px; right: 30px; width: 350px; height: 450px; max-width: calc(100vw - 40px); max-height: calc(100vh - 120px); background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 9998; display: none; flex-direction: column; overflow: hidden; transition: all 0.3s; border: 1px solid #ddd; }
.chatbot-header { background: linear-gradient(135deg, #005b9f, #003b73); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.chatbot-body { flex: 1; padding: 15px; overflow-y: auto; background: #f8f9fa; display: flex; flex-direction: column; gap: 12px; }
.chatbot-footer { padding: 12px; background: white; border-top: 1px solid #ddd; display: flex; gap: 8px; align-items: center; }
.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 15px; font-size: 13px; line-height: 1.5; word-wrap: break-word; }
.chat-bot { background: #e9ecef; color: #333; align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid #e0e0e0; }
.chat-user { background: #005b9f; color: white; align-self: flex-end; border-bottom-right-radius: 4px; box-shadow: 0 2px 5px rgba(0,91,159,0.2); }

/* DARK MODE STYLES */
body.dark-mode { background-color: #121212 !important; color: #e0e0e0 !important; }
body.dark-mode #profil-section, body.dark-mode #dashboard-area { background-color: #1a1a1a !important; border-color: #333; color: #e0e0e0; }
body.dark-mode .navbar { background-color: rgba(30, 30, 30, 0.95); border-bottom: 1px solid #333; }
body.dark-mode .nav-link, body.dark-mode .navbar-brand span { color: #f0f0f0 !important; }
body.dark-mode .text-muted, body.dark-mode .text-secondary { color: #aaa !important; }
body.dark-mode .custom-map-control { background: rgba(30, 30, 30, 0.95); color: #fff; border: 1px solid #444 !important; }
body.dark-mode .custom-map-control h6, body.dark-mode .custom-map-control label { color: #eee !important; }
body.dark-mode .nav-pills .nav-link { color: #aaa; background-color: #333; }
body.dark-mode .nav-pills .nav-link.active { background-color: #4db8ff; color: #121212 !important; }
body.dark-mode .form-control { background-color: #333; color: #fff; border-color: #555; }
body.dark-mode .search-result-box { border-color: #444; }
body.dark-mode .list-group-item { background-color: #333; color: #eee; border-color: #444; }
body.dark-mode .list-group-item:hover { background-color: #444; }
body.dark-mode .leaflet-popup-content-wrapper { background: #222; color: #fff; }
body.dark-mode .leaflet-popup-tip { background: #222; }
body.dark-mode .table-popup th { background-color: #333; color: #fff; border-color: #555; }
body.dark-mode .table-popup td { color:#ddd; border-color: #555; }
body.dark-mode .kavling-label-tooltip { background-color: rgba(0,0,0,0.8); border-color: #4db8ff; color: #fff !important; }
body.dark-mode .kavling-label-tooltip span { color: #ddd !important; }
body.dark-mode .kavling-label-tooltip span:first-child { color: #4db8ff !important; }
body.dark-mode .modal-content { background-color: #222; color: #eee; border: 1px solid #444; }
body.dark-mode .modal-header, body.dark-mode .modal-footer { border-color: #444; }
body.dark-mode .form-select, body.dark-mode input[readonly] { background-color: #333; color: #fff; border-color: #555; }
body.dark-mode table.table { color: #eee; border-color: #555;}
body.dark-mode .table-striped>tbody>tr:nth-of-type(odd)>* { background-color: rgba(255,255,255,0.05); color: #fff; }
body.dark-mode .table-hover>tbody>tr:hover>* { background-color: rgba(255,255,255,0.1); color: #fff; }
body.dark-mode .leaflet-layer { filter: brightness(0.7) contrast(1.2); }
body.dark-mode .tiles-autocad-layer { mix-blend-mode: screen; filter: brightness(1.5); }
body.dark-mode .chatbot-window { background: #222; border-color: #444; }
body.dark-mode .chatbot-header { background: linear-gradient(135deg, #111, #222); border-bottom: 1px solid #333; }
body.dark-mode .chatbot-body { background: #1a1a1a; }
body.dark-mode .chatbot-footer { background: #222; border-color: #444; }
body.dark-mode .chat-bot { background: #333; color: #eee; border-color: #444; }