/* === MODAL OVERLAY === */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

/* === MODAL BOX === */
.modal-content {
  background: rgba(25, 27, 34, 0.95);
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 960px;
  width: 95%;
  height: 680px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === JUDUL MODAL === */
.modal-content h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* === TAB NAVIGATION === */
.tab-navigation {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* === TOMBOL TAB === */
.tab-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-primary, #fff);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
}

.tab-btn.active {
  background: rgba(0, 191, 255, 0.15);
  border-color: var(--highlight, #00bfff);
  color: var(--highlight, #00bfff);
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.4);
}

/* === WRAPPER KONTEN TAB (opsional) === */
.tab-wrapper {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}

/* === SECTION PER TAB === */
.section-tab {
  display: none;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  flex-grow: 1;
}

.section-tab.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* === FOOTER MODAL === */
.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  background: transparent;
  z-index: 10;
}

/* === INPUT, SELECT, TEXTAREA === */
.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  max-width: 480px;
  padding: 10px;
  background: #1d1f25;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* === TOMBOL CLOSE === */
.modal .close {
  position: absolute;
  right: 15px;
  top: 15px;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .modal-content {
    height: 90vh;
    padding: 20px;
  }

  .modal-content input,
  .modal-content select,
  .modal-content textarea {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row label {
    text-align: left;
    width: 100%;
    margin-bottom: 6px;
  }
}
.tab-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}
.modal-content.large {
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

#edit-user-form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
}

.section-tab.tab-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 6px;
}

/* Agar footer tetap berada di bawah */
.modal-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  gap: 10px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 20px;
}
