/* === RESET & GLOBAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}
img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.back-icon svg {
  width: 32px;
  height: 32px;
  stroke: #003366;
}

/* === HEADER & SIDEBAR === */

.main-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #fff;
  padding: 12px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease;
}

/*.main-header {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 999;
  transition: top 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}*/

.header-page {
  margin-top: 70px;
  margin-left: 240px; /* ini baru ditambah */
  background-color: #ecf0f1;
  padding: 15px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
}

.main-header.hide {
  transform: translateY(-100%);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-name {
  font-weight: bold;
  font-size: 1.4rem;
  color: #01356f;
}

.app-desc {
  font-size: 0.85rem;
}

.short-desc {
  display: none;
}

.logo {
  height: 40px;
}

.app-name {
  font-size: 20px;
  font-weight: bold;
  color: #003366;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  margin-top: 8px;
}

.search-form {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.search-form input[type="text"] {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 200px;
}

.search-form button {
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #007BFF;
  border: none;
  color: white;
  cursor: pointer;
}

.search-form button:hover {
  background-color: #0056b3;
}

.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #003366;
  z-index: 1100;
  cursor: pointer;
  margin-left: 12px;
}

.dashboard-header, .sticky-header {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 100;
  padding: 16px 24px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);

}
.dashboard-header h1, .sticky-header h2 {
  font-size: 24px;
  color: #003366;
  font-weight: bold;
}

.form-header-sticky {
  position: sticky;
  top: 0;
  background-color: #f9f9f9;
  padding: 20px 0;
  margin-top: 10px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #003366;
  z-index: 999;
  border-bottom: 1px solid #ddd;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
  background-color: #f8f8f8;
  border-top: 1px solid #ddd;
}

.footer-nav a {
  text-decoration: none;
  color: #003366;
  font-weight: 500;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h2 {
  color: #f2c100;
  font-size: 20px;
  margin-bottom: 20px;
}
.sidebar ul {
  list-style: none;
}
.sidebar ul li {
  margin: 16px 0;
}
.sidebar ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 10px;
  display: block;
  border-radius: 6px;
  transition: 0.3s;
}
.sidebar ul li a:hover {
  background-color: #f2c100;
  color: #003366;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-divider {
  border: 0;
  height: 1px;
  background-color: #ffffff55; /* atau pakai warna solid misalnya #fff */
  margin: 10px 0;
}

.main-wrapper {
  margin-left: 230px;
}


/* === MAIN CONTENT === */
.main-content {
  margin-left: 230px;
  padding: 30px;
  
}

/* === BUTTONS === */
.btn, .btn-tambah, .btn-submit, .btn-hapus, .btn-back, .btn-next {
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: regular;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
}
.btn-tambah, .btn-submit {
  background-color: #d1b308;
  color: #777774;
}
.btn-tambah:hover, .btn-submit:hover {
  background-color: #bda806;
  color: #fff;
}
.btn-back {
  background-color: #003366;
  color: #fff;
}
.btn-next {
  background-color: #007BFF;
  color: #fff;
}
.btn-back:hover, .btn-next:hover {
  background-color: #0056b3;
}
.btn-danger {
  background-color: goldenrod;
  color: #c7caf0;
}
.btn-hapus:hover {
  color: #fff;
  transform: scale(1.05);
}

.btn-danger-small {
  background-color: rgb(53, 106, 249);
  color: white;
  border: none;
  padding: 3px 6px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
}

.floating-btn {
  position: fixed;
  bottom: 30px;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  z-index: 999;
  transition: transform 0.2s ease;
 }

.floating-btn.right-btn {
  background-color: gold;
  color: #000000;
  right: 30px;
}

.btn-export {
  background-color: #28a745;
  color: white;
  padding: 8px 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-export:hover {
  background-color: #218838;
}

/* Tombol kiri (hapus) */
.floating-btn.left-btn {
  background-color: #58a5f1;
  color: rgb(2, 18, 163);
  border-radius: 8px;
}
.floating-btn.left-btn:hover {
  background-color: #4c9ef5;
  color: rgb(255, 255, 255);
  border-radius: 8px;
}

.floating-btn.right-btn:hover {
  transform: scale(1.05);
  background-color: goldenrod;
  color: whitesmoke;
}

/* === INFO BOX === */
.info-box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}
.info-box {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  color: #003366;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.info-box.total {
  background-color: #edf4c5; /* kuning muda */
}

.info-box.tanah {
  background-color: #b2ebf2; /* biru muda */
}

.info-box.bangunan {
  background-color: #f3d4eb; /* hijau muda */
}

/* === ASSET CARD === */
.assets-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.asset-card {
  display: flex;
  background: #edf3f2;
  padding: 20px;
  border-radius: 10px;
  gap: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: 0.3s;
}
.asset-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.asset-info h3 {
  color: #003366;
  margin-bottom: 8px;
}
.asset-info p {
  font-size: 14px;
  color: #444;
}

/* === FORM (TAMBAH / EDIT / DETAIL) === */
.form-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 30px;
  color: #003366;
}
.form-container, .form-grid {
  max-width: 900px;
  margin: 30px auto;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #003366;
}
.form-group input, .form-group select {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.form-group.bordered {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

/* === DETAIL ASET === */
.detail-container {
  max-width: 900px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.thumbnail-main img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.gambar-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.gambar-detail {
  max-width: 45%;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 30px;
  font-size: 15px;
  color: #003366;
  margin-bottom: 30px;
}
.detail-info-grid div {
  background: #fff;
  padding: 12px 16px;
  border-left: 4px solid #f2c100;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.detail-info-grid b {
  display: block;
  margin-bottom: 4px;
  color: #003366;
}

.btn-update {
  background-color: #007bff;
  color: white;
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
}

.btn-delete {
  background-color: gold;
  color: black;
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
}


/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-buttons {
  margin-top: 20px;
  text-align: right;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-hapus-konfirmasi {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.btn-batal-konfirmasi {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.modal-box {
  background: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  text-align: center;
}

.close-btn {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-evenly;
  gap: 1rem;
}

.btn-cancel {
  background-color: #ccc;
}

.warning-text {
  color: #a94442;
  margin: 1rem 0;
}

.close-btn,
.btn-delete,
.btn-cancel,
.modal-actions button,
a.btn-delete {
  cursor: pointer;
}


.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}
.modal-buttons button {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}
.modal-buttons .ya-btn {
  background-color: #003366;
  color: white;
}
.modal-buttons .batal-btn {
  background-color: #ccc;
  color: #003366;
}

/* === KONTEN KELLOLA PENGGUNA === */
.aksi-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: start;
  align-items: center;
}

.badge-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  background-color: #28a745;
  color: white;
}

.data-table input[type="password"] {
  padding: 4px 2px;
  border-radius: 2px;
  border: 1px solid #ccc;
  width: 100%;
}

.btn-simpan-aksi,
.btn-hapus-aksi {
  min-width: 100px;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 0.7rem;
  border-radius: 6px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
}

.password-input {
  width: 100%;
  padding-right: 2rem;
}

/* Tombol Simpan */
.btn-simpan-aksi {
  background-color: #d1b308;
  color: #ffffff;
}

.btn-simpan-aksi:hover {
  background-color: #bfa107;
  color: #fff;
}

/* Tombol Hapus */
.btn-hapus-aksi {
  background-color: rgb(74, 104, 238);
  color: rgb(255, 255, 255);
  border-radius: 7px;
  border: none;
}

.btn-hapus-aksi:hover {
  background-color: #031e77;
  color: white;
}

.data-table th {
  background: #dabf20;
  color: #fff;
}

/* === LANDING PAGE === */


/* === FLASH MESSAGES === */
.flash-messages {
  list-style: none;
  padding: 0;
  margin-bottom: 10px;
}
.flash-messages li {
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}
.flash-messages li.success {
  background: #d4edda;
  color: #155724;
}
.flash-messages li.error {
  background: #f8d7da;
  color: #721c24;
}

/* === AVATAR / USER PROFILE === */
.user-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.sidebar-menu.logout-only {
  margin-top: auto;
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #003366;
    width: 230px;
    height: 100%;
    transform: (-100%);
    padding: 80px 20px 20px;
    z-index: 800;
    transition: transform 0.3s ease-in-out;
  }

  .long-desc {
    display: none;
  }

  .short-desc {
    display: inline;
  }

  .app-desc {
    white-space: nowrap;
  }

   .header-page {
    margin-left: 0;
  }

  .sidebar.active {
    display: block;
    transform: translateX(0);
  }

  .hamburger {
    display: block;
    position: relative;
  }

  .main-header {
  transition: transform 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgb(255, 255, 255);
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .logo {
    width: 36px;
    height: auto;
  }

  .app-name {
    font-size: 18px;
    font-weight: bold;
    color: #003366;
  }

  .header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .search-form {
    width: 100%;
    max-width: 250px;
  }

  .search-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
  }

  .search-form button {
    padding: 6px 10px;
    font-size: 14px;
    margin-left: 4px;
  }

.main-content {
    margin-left: 0 !important;
    padding: 20px;
  }

   .sidebar {
    display: none;
    transform: translateX(-100%);
  }
 
  .form-row,
  .detail-info-grid {
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
  }
  
  .form-group {
    flex: 1 1 100%;
  }
  .btn, .btn-tambah, .btn-submit, .btn-hapus {
    width: 100%;
  }

   .floating-btn.right-btn {
    right: 20px;
    bottom: 20px;
  }

  .floating-btn.left-btn {
    left: 20px;
    bottom: 20px;
  }
 }

@media (max-width: 480px) {
  .landing-container {
    padding: 1.5rem;
  }
  .button-group {
    flex-direction: column;
    gap: 0.8rem;
  }
  .btn {
    width: 100%;
  }

  .sidebar {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  }
  .sidebar.active {
  transform: translateX(0);
  }

  .floating-btn.right-btn {
    right: 16px;
    bottom: 16px;
  }

  .floating-btn.left-btn {
    left: 16px;
    bottom: 76px; /* dinaikkan lebih tinggi di layar lebih kecil */
  }

}

/* === RESET & GLOBAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}
img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.back-icon svg {
  width: 32px;
  height: 32px;
  stroke: #003366;
}

/* === HEADER & SIDEBAR === */
.dashboard-header, .sticky-header {
  position: sticky;
  top: 0;
  background-color: rgb(255, 255, 255);
  z-index: 100;
  padding: 16px 24px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.dashboard-header h1, .sticky-header h2 {
  font-size: 24px;
  color: #006613;
  font-weight: bold;
}

.form-header-sticky {
  position: sticky;
  top: 0;
  background-color: #f9f9f9;
  padding: 20px 0;
  margin-top: 10px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #003366;
  z-index: 999;
  border-bottom: 1px solid #ddd;
}

.sidebar {
  width: 230px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  background-color: #003366;
  color: #fff;
  padding: 80px 20px 20px;
  z-index: 800;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}
.sidebar h2 {
  color: #f2c100;
  font-size: 20px;
  margin-bottom: 20px;
}
.sidebar ul {
  list-style: none;
}
.sidebar ul li {
  margin: 16px 0;
}
.sidebar ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 10px;
  display: block;
  border-radius: 6px;
  transition: 0.3s;
}
.sidebar ul li a:hover {
  background-color: #f2c100;
  color: #003366;
}

.sidebar .profile-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Gaya tabel untuk dashboard === */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

table thead {
  background-color: #f0f0f0;
}

.tabel-laporan {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.tabel-laporan th, .tabel-laporan td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

.tabel-laporan th {
  background-color: #f5f5f5;
}

